diff options
author | tomsmeding <tom.smeding@gmail.com> | 2016-08-18 22:05:21 +0200 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2016-08-18 22:05:21 +0200 |
commit | 15fb03902ff5550b3a8c44bde3e08df876449f7a (patch) | |
tree | 3038093b4bc1fff20e3f713d2ed8c3e9f2a1cec8 /ast.c | |
parent | 2c30522aa65126ebacfd52f7b38a2e24682d7065 (diff) |
Third
Diffstat (limited to 'ast.c')
-rw-r--r-- | ast.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -41,7 +41,9 @@ AST* ast_copy(const AST *ast){ assert(ast->l.nodes); AST **nodes=malloc(ast->l.len,AST*); for(int i=0;i<ast->l.len;i++)nodes[i]=ast_copy(ast->l.nodes[i]); - return ast_list(ast->l.len,nodes); + AST *l=ast_list(ast->l.len,nodes); + l->l.quoted=ast->l.quoted; + return l; } case AST_WORD: @@ -71,6 +73,7 @@ AST* ast_list(int len,AST **nodes){ ast->l.len=len; ast->l.nodes=malloc(len,AST*); memcpy(ast->l.nodes,nodes,len*sizeof(AST*)); + ast->l.quoted=false; return ast; } |