summaryrefslogtreecommitdiff
path: root/src/parser.y
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2012-10-07 19:24:08 (GMT)
committerMarius Kintel <marius@kintel.net>2012-10-07 19:24:08 (GMT)
commit0cea83a35d302929d22ddddbaa60280af62bf4dc (patch)
tree554d284a761cf37704a43de8b034df5ff784aa60 /src/parser.y
parentfa9811c0f3314a0f343385c2cba7e691fa814b08 (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.y37
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 {
contact: Jan Huwald // Impressum