summaryrefslogtreecommitdiffhomepage
path: root/parser.y
diff options
context:
space:
mode:
Diffstat (limited to 'parser.y')
-rw-r--r--parser.y2
1 files changed, 2 insertions, 0 deletions
diff --git a/parser.y b/parser.y
index 1d71a16..938a341 100644
--- a/parser.y
+++ b/parser.y
@@ -177,6 +177,8 @@ try_catch_block(A) ::= empty_object. { A = 0; }
switch_stmt(A) ::= T_SWITCH(B) T_LPAREN exp(C) T_RPAREN T_LBRACE switch_cases(D) T_RBRACE.
{ A = wrap_op(B, C, D); }
+switch_stmt(A) ::= T_SWITCH T_LPAREN exp(B) T_RPAREN empty_object.
+ { A = B; }
switch_cases(A) ::= switch_cases(B) switch_case(C). { A = append_op(B, C); }
switch_cases(A) ::= switch_case(B). { A = B; }