summaryrefslogtreecommitdiff
path: root/src/parser.y
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.y')
-rw-r--r--src/parser.y4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/parser.y b/src/parser.y
index 024d61a..c5b86ea 100644
--- a/src/parser.y
+++ b/src/parser.y
@@ -69,6 +69,8 @@ void yyerror( YYLTYPE *llocp, yyscan_t yyscanner, GameBuilder &, const char *err
69%token tokMinusAssign 69%token tokMinusAssign
70%token tokTimesAssign 70%token tokTimesAssign
71%token tokDivideAssign 71%token tokDivideAssign
72%token tokExists
73%token tokDelete
72%token <sValue> tokSituationName 74%token <sValue> tokSituationName
73%token <sValue> tokIdent 75%token <sValue> tokIdent
74%token tokGoto 76%token tokGoto
@@ -234,6 +236,8 @@ literal: tokInt { bld.addLiteral( Variable( $1 ) ); }
234 ; 236 ;
235 237
236expr: literal 238expr: literal
239 | tokExists '(' varRef ')' { bld.addNode( AstNode::tExists ); }
240 | tokDelete '(' varRef ')' { bld.addNode( AstNode::tDelete ); }
237 | tokIdent '(' funcCallParams ')' { bld.addFuncCall( *($1) ); } 241 | tokIdent '(' funcCallParams ')' { bld.addFuncCall( *($1) ); }
238 | varRef 242 | varRef
239 | varRef '=' expr { bld.addNode( AstNode::tStore ); } 243 | varRef '=' expr { bld.addNode( AstNode::tStore ); }