diff options
author | Mike Buland <eichlan@xagasoft.com> | 2011-12-27 00:32:12 -0700 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2011-12-27 00:32:12 -0700 |
commit | 40e08192a08f55b5090d5ef28f48c74613e2e5a0 (patch) | |
tree | 352817365ce93d8d022cc1e04f5a411ce0df2b01 /src/gamebuilder.cpp | |
parent | f33fdd93ef93fdbb0e6b3a8e2ecb80b78f1b2816 (diff) | |
download | stage-40e08192a08f55b5090d5ef28f48c74613e2e5a0.tar.gz stage-40e08192a08f55b5090d5ef28f48c74613e2e5a0.tar.bz2 stage-40e08192a08f55b5090d5ef28f48c74613e2e5a0.tar.xz stage-40e08192a08f55b5090d5ef28f48c74613e2e5a0.zip |
Wow, a whole lot of code builds now.
Diffstat (limited to 'src/gamebuilder.cpp')
-rw-r--r-- | src/gamebuilder.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/gamebuilder.cpp b/src/gamebuilder.cpp index 44fd6c1..47de17d 100644 --- a/src/gamebuilder.cpp +++ b/src/gamebuilder.cpp | |||
@@ -57,8 +57,6 @@ void GameBuilder::addParam( const Bu::String &sName ) | |||
57 | 57 | ||
58 | void GameBuilder::addNode( AstNode::Type iType ) | 58 | void GameBuilder::addNode( AstNode::Type iType ) |
59 | { | 59 | { |
60 | sio << " - Added type " << Fmt::hex() << iType << sio.nl; | ||
61 | |||
62 | switch( iType&AstNode::tTypeMask ) | 60 | switch( iType&AstNode::tTypeMask ) |
63 | { | 61 | { |
64 | case AstNode::tBranch: | 62 | case AstNode::tBranch: |
@@ -71,6 +69,11 @@ void GameBuilder::addNode( AstNode::Type iType ) | |||
71 | } | 69 | } |
72 | } | 70 | } |
73 | 71 | ||
72 | void GameBuilder::closeNode() | ||
73 | { | ||
74 | pCurNode = pCurNode->getParent(); | ||
75 | } | ||
76 | |||
74 | void GameBuilder::addLiteral( const Variable &v ) | 77 | void GameBuilder::addLiteral( const Variable &v ) |
75 | { | 78 | { |
76 | setLiteral( v ); | 79 | setLiteral( v ); |
@@ -78,11 +81,13 @@ void GameBuilder::addLiteral( const Variable &v ) | |||
78 | { | 81 | { |
79 | pCurNode->addNode( new AstLeafLiteral( v ) ); | 82 | pCurNode->addNode( new AstLeafLiteral( v ) ); |
80 | } | 83 | } |
81 | sio << " - Added literal " << v << sio.nl; | ||
82 | } | 84 | } |
83 | 85 | ||
84 | void GameBuilder::addVarRef( const Bu::String &sName ) | 86 | void GameBuilder::addVarRef( const Bu::String &sName ) |
85 | { | 87 | { |
86 | sio << " - Added varref '" << sName << "'" << sio.nl; | 88 | if( pCurNode ) |
89 | { | ||
90 | pCurNode->addNode( new AstLeafLiteral( AstNode::tVarName, sName ) ); | ||
91 | } | ||
87 | } | 92 | } |
88 | 93 | ||