Booleans can be used in a switch

This commit is contained in:
Cédric Pasteur 2010-07-12 09:25:36 +02:00
parent eb625cd5d7
commit c5184b5d66

View file

@ -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] }