diff options
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; } |