diff options
author | Adrian Thurston <thurston@colm.net> | 2018-05-20 13:47:27 -0400 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2018-05-20 13:47:27 -0400 |
commit | b5e6ba2c784d818c53c2a64af64a466865174c81 (patch) | |
tree | 44a377cf5ed066129dee3d8f86c5863ad8a6bb17 /src/parsetree.h | |
parent | 8498ebf5bee1b010dd680da632b0eff66458b494 (diff) | |
download | colm-b5e6ba2c784d818c53c2a64af64a466865174c81.tar.gz |
make the rhs of switch vars available in case clauses
Diffstat (limited to 'src/parsetree.h')
-rw-r--r-- | src/parsetree.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/parsetree.h b/src/parsetree.h index 7fc2e164..f81bdbec 100644 --- a/src/parsetree.h +++ b/src/parsetree.h @@ -72,7 +72,7 @@ struct TemplateType; struct ObjectMethod; struct Reduction; struct Production; - +struct LangVarRef; /* * Code Vector @@ -831,7 +831,8 @@ struct NameScope : owningObj(0), parentScope(0), - childIter(0) + childIter(0), + caseClauseVarRef(0) {} ObjectDef *owningObj; @@ -843,6 +844,7 @@ struct NameScope /* For iteration after declaration. */ NameScope *childIter; + LangVarRef *caseClauseVarRef; NameScope *prev, *next; @@ -862,6 +864,7 @@ struct NameScope ObjectField *checkRedecl( const String &name ); void insertField( const String &name, ObjectField *value ); + }; @@ -2834,6 +2837,7 @@ struct LangVarRef bool isInbuiltObject() const; bool isLocalRef() const; + bool isProdRef( Compiler *pd ) const; bool isStructRef() const; void loadQualification( Compiler *pd, CodeVect &code, NameScope *rootScope, int lastPtrInQual, bool forWriting, bool revert ) const; |