From 16bd19ed4399cfa56ee9d7d5d467b0f25cf91646 Mon Sep 17 00:00:00 2001 From: FourteenBrush Date: Fri, 2 Feb 2024 21:00:00 +0100 Subject: Fix Unhandled Ast_OrBranchExpr --- src/parser.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/parser.cpp') diff --git a/src/parser.cpp b/src/parser.cpp index 2671054df..6127be38e 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); -- cgit v1.2.3 From 0e5d7801dde74a3e22f9d6c0d27b749bae2a2e7f Mon Sep 17 00:00:00 2001 From: FourteenBrush Date: Fri, 2 Feb 2024 21:17:10 +0100 Subject: Fix code style --- src/parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/parser.cpp') diff --git a/src/parser.cpp b/src/parser.cpp index 86e2dcf68..48f2f8617 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -232,7 +232,7 @@ gb_internal Ast *clone_ast(Ast *node, AstFile *f) { break; case Ast_OrBranchExpr: n->OrBranchExpr.label = clone_ast(n->OrBranchExpr.label, f); - n->OrBranchExpr.expr = clone_ast(n->OrBranchExpr.expr, f); + n->OrBranchExpr.expr = clone_ast(n->OrBranchExpr.expr, f); break; case Ast_TypeAssertion: n->TypeAssertion.expr = clone_ast(n->TypeAssertion.expr, f); -- cgit v1.2.3