Commit afaa9cd7 authored by Paul Hervot's avatar Paul Hervot
Browse files

bison: do not fuse switches using YYCASE_

More recent versions of bison generate some switch blocks using a
`YYCASE_` macro. This macro made the fuse-switch script stop outputing,
resulting in a botched generated file.

This commit make the fuse-switch ignore those switch blocks and keep
them as is.

fix #215
parent 80dcad90
Pipeline #11756 failed with stage
in 152 minutes and 36 seconds
......@@ -84,6 +84,16 @@ sub fuse($$)
$in_switch = 1;
elsif (/#define YYCASE_/)
# If we're in a switch but see this macro, keep the switch as is
# altogether
# Usually at this point $pre_case contains the openning '{' of the
# switch
$_ = $pre_case . $_;
$pre_case = '';
$in_switch = 0;
# in switch.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment