Switch cases do not require colon

This commit is contained in:
Alex Beregszaszi 2017-05-19 23:15:07 +01:00
parent d9abe7b712
commit 0e0de7b7fd

View File

@ -88,9 +88,9 @@ Grammar::
Expression = Expression =
FunctionCall | Identifier | Literal FunctionCall | Identifier | Literal
Switch = Switch =
'switch' Expression Case+ ( 'default' ':' Block )? 'switch' Expression Case+ ( 'default' Block )?
Case = Case =
'case' Literal ':' Block 'case' Literal Block
ForLoop = ForLoop =
'for' Block Expression Block Block 'for' Block Expression Block Block
BreakContinue = BreakContinue =