diff options
author | Marius Kintel <marius@kintel.net> | 2012-10-07 19:24:08 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2012-10-07 19:24:08 (GMT) |
commit | 0cea83a35d302929d22ddddbaa60280af62bf4dc (patch) | |
tree | 554d284a761cf37704a43de8b034df5ff784aa60 /src/parser.y | |
parent | fa9811c0f3314a0f343385c2cba7e691fa814b08 (diff) |
Fixed weakness in parser causing modifier characters not to work in front of 'if' statements. Fixes #197
Diffstat (limited to 'src/parser.y')
-rw-r--r-- | src/parser.y | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/src/parser.y b/src/parser.y index c11f0f2..3e485ff 100644 --- a/src/parser.y +++ b/src/parser.y @@ -233,6 +233,22 @@ ifelse_statement: } ; module_instantiation: + '!' module_instantiation { + $$ = $2; + if ($$) $$->tag_root = true; + } | + '#' module_instantiation { + $$ = $2; + if ($$) $$->tag_highlight = true; + } | + '%' module_instantiation { + $$ = $2; + if ($$) $$->tag_background = true; + } | + '*' module_instantiation { + delete $2; + $$ = NULL; + } | single_module_instantiation ';' { $$ = $1; } | @@ -271,26 +287,7 @@ single_module_instantiation: $$->argexpr = $3->argexpr; free($1); delete $3; - } | - '!' single_module_instantiation { - $$ = $2; - if ($$) - $$->tag_root = true; - } | - '#' single_module_instantiation { - $$ = $2; - if ($$) - $$->tag_highlight = true; - } | - '%' single_module_instantiation { - $$ = $2; - if ($$) - $$->tag_background = true; - } | - '*' single_module_instantiation { - delete $2; - $$ = NULL; - }; + } expr: TOK_TRUE { |