From 40e08192a08f55b5090d5ef28f48c74613e2e5a0 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 27 Dec 2011 00:32:12 -0700 Subject: Wow, a whole lot of code builds now. --- src/gamebuilder.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/gamebuilder.cpp') 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 ) void GameBuilder::addNode( AstNode::Type iType ) { - sio << " - Added type " << Fmt::hex() << iType << sio.nl; - switch( iType&AstNode::tTypeMask ) { case AstNode::tBranch: @@ -71,6 +69,11 @@ void GameBuilder::addNode( AstNode::Type iType ) } } +void GameBuilder::closeNode() +{ + pCurNode = pCurNode->getParent(); +} + void GameBuilder::addLiteral( const Variable &v ) { setLiteral( v ); @@ -78,11 +81,13 @@ void GameBuilder::addLiteral( const Variable &v ) { pCurNode->addNode( new AstLeafLiteral( v ) ); } - sio << " - Added literal " << v << sio.nl; } void GameBuilder::addVarRef( const Bu::String &sName ) { - sio << " - Added varref '" << sName << "'" << sio.nl; + if( pCurNode ) + { + pCurNode->addNode( new AstLeafLiteral( AstNode::tVarName, sName ) ); + } } -- cgit v1.2.3