Booleans can be used in a switch
This commit is contained in:
parent
eb625cd5d7
commit
c5184b5d66
1 changed files with 5 additions and 1 deletions
|
@ -341,10 +341,14 @@ escapes:
|
|||
;
|
||||
|
||||
switch_handler:
|
||||
| constructor loc_vars DO equs
|
||||
| constructor_or_bool loc_vars DO equs
|
||||
{ { 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_handler
|
||||
{ [$1] }
|
||||
|
|
Loading…
Reference in a new issue