From 35f71b12dc48a928d98743f607f62b2f6dbe7307 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 29 Dec 2011 23:30:49 -0700 Subject: Goto works, scopes work. --- src/parser.y | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/parser.y') diff --git a/src/parser.y b/src/parser.y index ccb0c97..484fd25 100644 --- a/src/parser.y +++ b/src/parser.y @@ -188,10 +188,10 @@ ifnext: | tokElse { bld.addNode( AstNode::tScope ); } ifbase ; -varRef: tokIdent { bld.addVarRef( *($1) ); } - | tokPlayer '.' tokIdent - | tokGlobal '.' tokIdent - | tokSituation '.' tokIdent +varRef: tokIdent { bld.addVarRef( *($1), sidLocal ); } + | tokPlayer '.' tokIdent { bld.addVarRef( *($3), sidPlayer ); } + | tokGlobal '.' tokIdent { bld.addVarRef( *($3), sidGlobal ); } + | tokSituation '.' tokIdent { bld.addVarRef( *($3), sidSituation ); } ; literal: tokInt { bld.addLiteral( Variable( $1 ) ); } -- cgit v1.2.3