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/gamebuilder.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gamebuilder.cpp') diff --git a/src/gamebuilder.cpp b/src/gamebuilder.cpp index d1b4430..87389ff 100644 --- a/src/gamebuilder.cpp +++ b/src/gamebuilder.cpp @@ -61,7 +61,7 @@ void GameBuilder::endFunctionParams() for( Bu::StringList::iterator i = lRev.begin(); i; i++ ) { - addVarRef( *i ); + addVarRef( *i, sidLocal ); addNode( AstNode::tSwap ); addNode( AstNode::tStore ); } @@ -128,11 +128,11 @@ void GameBuilder::addLiteral( const Variable &v ) } } -void GameBuilder::addVarRef( const Bu::String &sName ) +void GameBuilder::addVarRef( const Bu::String &sName, ScopeId sid ) { if( pCurNode ) { - pCurNode->addNode( new AstLeafLiteral( AstNode::tVarName, Variable::newVariableName( sName ) ) ); + pCurNode->addNode( new AstLeafLiteral( AstNode::tVarName, Variable::newVariableName( sName, sid ) ) ); } } -- cgit v1.2.3