summaryrefslogtreecommitdiff
path: root/src/parser.y
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.y')
-rw-r--r--src/parser.y9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/parser.y b/src/parser.y
index e127627..b50b897 100644
--- a/src/parser.y
+++ b/src/parser.y
@@ -121,9 +121,9 @@ bodyDecl:
121 | bodyDecl function 121 | bodyDecl function
122 ; 122 ;
123 123
124situationMode: tokSituation tokSituationName { bld.beginSituation( *($2) ); } 124situationMode: tokSituation tokSituationName { bld.beginSituation( *($2), Situation::inputCommand ); }
125 | tokCommand tokSituation tokSituationName { bld.beginSituation( *($2) ); } 125 | tokCommand tokSituation tokSituationName { bld.beginSituation( *($3), Situation::inputCommand ); }
126 | tokOption tokSituation tokSituationName { bld.beginSituation( *($2) ); } 126 | tokOption tokSituation tokSituationName { bld.beginSituation( *($3), Situation::inputOption ); }
127 ; 127 ;
128 128
129situation: situationMode '{' situationMembers '}' { bld.endSituation(); } 129situation: situationMode '{' situationMembers '}' { bld.endSituation(); }
@@ -284,7 +284,8 @@ dictValues: expr ':' expr { bld.addNode( AstNode::tInsert ); }
284 | dictValues ',' expr ':' expr { bld.addNode( AstNode::tInsert ); } 284 | dictValues ',' expr ':' expr { bld.addNode( AstNode::tInsert ); }
285 ; 285 ;
286 286
287optionDecl: tokOption ':' tokString '{' cmpltExprList '}' 287optionDecl: tokOption ':' tokString { bld.beginOption( *$3 ); } '{'
288 cmpltExprList '}' { bld.closeOption(); }
288 ; 289 ;
289 290
290commandDecl: tokCommand ':' tokString { bld.beginCommand( *$3 ); } 291commandDecl: tokCommand ':' tokString { bld.beginCommand( *$3 ); }