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/variable.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/variable.h') diff --git a/src/variable.h b/src/variable.h index 42dd865..7f482a3 100644 --- a/src/variable.h +++ b/src/variable.h @@ -6,6 +6,17 @@ #include #include +#include "enums.h" + +class VariableRef +{ +public: + ScopeId sid; + Bu::String sName; + + bool operator==( const VariableRef &rhs ) const; +}; + class Variable { friend uint32_t Bu::__calcHashCode( const Variable &k ); @@ -35,7 +46,7 @@ public: virtual ~Variable(); static Variable newSituationName( const Bu::String &s ); - static Variable newVariableName( const Bu::String &s ); + static Variable newVariableName( const Bu::String &s, ScopeId sid ); Type getType() const { return eType; } @@ -43,6 +54,7 @@ public: int64_t getInt() const; double getFloat() const; Bu::String getString() const; + VariableRef getVariableRef() const; Variable to( Type e ) const; @@ -81,6 +93,7 @@ private: Bu::String *sValue; VList *lValue; VHash *hValue; + VariableRef *rValue; }; }; -- cgit v1.2.3