diff options
| author | gingerBill <bill@gingerbill.org> | 2021-08-15 23:10:52 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-08-15 23:10:52 +0100 |
| commit | b2097604d5a462c0c45a8c11607e7b49c9f7af68 (patch) | |
| tree | b85f843dfc33305c9d1696a2e82d994d7e2650af /src/parser.cpp | |
| parent | 4e1c9b71f43a2cd14635b0c21e138f49dcd32045 (diff) | |
Add `clone_ast` for `or_else` and `or_return`
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index 9e684028d..c00585f37 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -187,6 +187,13 @@ Ast *clone_ast(Ast *node) { n->TernaryWhenExpr.cond = clone_ast(n->TernaryWhenExpr.cond); n->TernaryWhenExpr.y = clone_ast(n->TernaryWhenExpr.y); break; + case Ast_OrElseExpr: + n->OrElseExpr.x = clone_ast(n->OrElseExpr.x); + n->OrElseExpr.y = clone_ast(n->OrElseExpr.y); + break; + case Ast_OrReturnExpr: + n->OrReturnExpr.expr = clone_ast(n->OrReturnExpr.expr); + break; case Ast_TypeAssertion: n->TypeAssertion.expr = clone_ast(n->TypeAssertion.expr); n->TypeAssertion.type = clone_ast(n->TypeAssertion.type); |