diff options
Diffstat (limited to 'src/parser.y')
-rw-r--r-- | src/parser.y | 9 |
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 | ||
124 | situationMode: tokSituation tokSituationName { bld.beginSituation( *($2) ); } | 124 | situationMode: 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 | ||
129 | situation: situationMode '{' situationMembers '}' { bld.endSituation(); } | 129 | situation: 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 | ||
287 | optionDecl: tokOption ':' tokString '{' cmpltExprList '}' | 287 | optionDecl: tokOption ':' tokString { bld.beginOption( *$3 ); } '{' |
288 | cmpltExprList '}' { bld.closeOption(); } | ||
288 | ; | 289 | ; |
289 | 290 | ||
290 | commandDecl: tokCommand ':' tokString { bld.beginCommand( *$3 ); } | 291 | commandDecl: tokCommand ':' tokString { bld.beginCommand( *$3 ); } |