aboutsummaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/parser.cpp b/src/parser.cpp
index 04d1dabc8..a897ff9aa 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -4516,16 +4516,11 @@ Ast *parse_stmt(AstFile *f) {
break;
}
return s;
- } else if (tag == "assert") {
+ } else if (tag == "assert" || tag == "panic") {
Ast *t = ast_basic_directive(f, hash_token, name);
Ast *stmt = ast_expr_stmt(f, parse_call_expr(f, t));
expect_semicolon(f, stmt);
return stmt;
- } else if (tag == "panic") {
- Ast *t = ast_basic_directive(f, hash_token, name);
- Ast *stmt = ast_expr_stmt(f, parse_call_expr(f, t));
- expect_semicolon(f, stmt);
- return stmt;
} else if (name.string == "force_inline" ||
name.string == "force_no_inline") {
Ast *expr = parse_force_inlining_operand(f, name);