diff options
author | Mike Buland <eichlan@xagasoft.com> | 2011-12-29 23:30:49 -0700 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2011-12-29 23:30:49 -0700 |
commit | 35f71b12dc48a928d98743f607f62b2f6dbe7307 (patch) | |
tree | f4297f57e570f52f3776392fc8ed4075db1ab4ac /src/gamebuilder.cpp | |
parent | f66458278ce3663397fc985a1253c85b74f011e6 (diff) | |
download | stage-35f71b12dc48a928d98743f607f62b2f6dbe7307.tar.gz stage-35f71b12dc48a928d98743f607f62b2f6dbe7307.tar.bz2 stage-35f71b12dc48a928d98743f607f62b2f6dbe7307.tar.xz stage-35f71b12dc48a928d98743f607f62b2f6dbe7307.zip |
Goto works, scopes work.
Diffstat (limited to 'src/gamebuilder.cpp')
-rw-r--r-- | src/gamebuilder.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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() | |||
61 | 61 | ||
62 | for( Bu::StringList::iterator i = lRev.begin(); i; i++ ) | 62 | for( Bu::StringList::iterator i = lRev.begin(); i; i++ ) |
63 | { | 63 | { |
64 | addVarRef( *i ); | 64 | addVarRef( *i, sidLocal ); |
65 | addNode( AstNode::tSwap ); | 65 | addNode( AstNode::tSwap ); |
66 | addNode( AstNode::tStore ); | 66 | addNode( AstNode::tStore ); |
67 | } | 67 | } |
@@ -128,11 +128,11 @@ void GameBuilder::addLiteral( const Variable &v ) | |||
128 | } | 128 | } |
129 | } | 129 | } |
130 | 130 | ||
131 | void GameBuilder::addVarRef( const Bu::String &sName ) | 131 | void GameBuilder::addVarRef( const Bu::String &sName, ScopeId sid ) |
132 | { | 132 | { |
133 | if( pCurNode ) | 133 | if( pCurNode ) |
134 | { | 134 | { |
135 | pCurNode->addNode( new AstLeafLiteral( AstNode::tVarName, Variable::newVariableName( sName ) ) ); | 135 | pCurNode->addNode( new AstLeafLiteral( AstNode::tVarName, Variable::newVariableName( sName, sid ) ) ); |
136 | } | 136 | } |
137 | } | 137 | } |
138 | 138 | ||