aboutsummaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2024-02-03 12:24:54 +0000
committerGitHub <noreply@github.com>2024-02-03 12:24:54 +0000
commitc311a60aaf825bc57995affa6382bbd0d429978d (patch)
tree7d01c12ed120751c5cfe3b7ecbb988f1f175bf3b /src/parser.cpp
parent2993490c756d1f815ab3f50af746658d087d56b6 (diff)
parent0e5d7801dde74a3e22f9d6c0d27b749bae2a2e7f (diff)
Merge pull request #3164 from FourteenBrush/master
Fix compiler panic: "src/parser.cpp(128): Panic: Unhandled Ast or branch expression"
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/parser.cpp b/src/parser.cpp
index 489d6b5d5..48f2f8617 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -230,6 +230,10 @@ gb_internal Ast *clone_ast(Ast *node, AstFile *f) {
case Ast_OrReturnExpr:
n->OrReturnExpr.expr = clone_ast(n->OrReturnExpr.expr, f);
break;
+ case Ast_OrBranchExpr:
+ n->OrBranchExpr.label = clone_ast(n->OrBranchExpr.label, f);
+ n->OrBranchExpr.expr = clone_ast(n->OrBranchExpr.expr, f);
+ break;
case Ast_TypeAssertion:
n->TypeAssertion.expr = clone_ast(n->TypeAssertion.expr, f);
n->TypeAssertion.type = clone_ast(n->TypeAssertion.type, f);