Booleans can be used in a switch
This commit is contained in:
parent
eb625cd5d7
commit
c5184b5d66
|
@ -341,10 +341,14 @@ escapes:
|
||||||
;
|
;
|
||||||
|
|
||||||
switch_handler:
|
switch_handler:
|
||||||
| constructor loc_vars DO equs
|
| constructor_or_bool loc_vars DO equs
|
||||||
{ { w_name = $1; w_block = mk_block $2 $4 } }
|
{ { w_name = $1; w_block = mk_block $2 $4 } }
|
||||||
;
|
;
|
||||||
|
|
||||||
|
constructor_or_bool:
|
||||||
|
| BOOL { Name(if $1 then "true" else "false") }
|
||||||
|
| constructor { $1 }
|
||||||
|
|
||||||
switch_handlers:
|
switch_handlers:
|
||||||
| switch_handler
|
| switch_handler
|
||||||
{ [$1] }
|
{ [$1] }
|
||||||
|
|
Loading…
Reference in a new issue