summaryrefslogtreecommitdiff
path: root/ast.c
diff options
context:
space:
mode:
Diffstat (limited to 'ast.c')
-rw-r--r--ast.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ast.c b/ast.c
index 3d84d97..8120feb 100644
--- a/ast.c
+++ b/ast.c
@@ -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;
}