diff options
Diffstat (limited to 'src/gamestate.cpp')
-rw-r--r-- | src/gamestate.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gamestate.cpp b/src/gamestate.cpp index 7b2d228..041af86 100644 --- a/src/gamestate.cpp +++ b/src/gamestate.cpp | |||
@@ -756,6 +756,23 @@ void GameState::parse( const AstBranch::NodeList &lCode ) | |||
756 | push( popDeref() ); | 756 | push( popDeref() ); |
757 | break; | 757 | break; |
758 | 758 | ||
759 | case AstNode::tExists: | ||
760 | { | ||
761 | Variable v = pop(); | ||
762 | VariableRef r = v.getVariableRef(); | ||
763 | push( Variable( hasVariable( r.sName, r.sid ) ) ); | ||
764 | } | ||
765 | break; | ||
766 | |||
767 | case AstNode::tDelete: | ||
768 | { | ||
769 | Variable v = pop(); | ||
770 | VariableRef r = v.getVariableRef(); | ||
771 | delVariable( r.sName, r.sid ); | ||
772 | push( Variable( Variable::tNull ) ); | ||
773 | } | ||
774 | break; | ||
775 | |||
759 | // tLeafLiteral | 776 | // tLeafLiteral |
760 | case AstNode::tVarName: | 777 | case AstNode::tVarName: |
761 | case AstNode::tLiteral: | 778 | case AstNode::tLiteral: |