diff options
author | Adrian Thurston <thurston@complang.org> | 2015-08-09 15:06:04 -0400 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2015-08-09 15:06:04 -0400 |
commit | 93dccf445bb3079dfa60d654ea5e56fbcc3f1c54 (patch) | |
tree | c8297427852cb8eb7bfbc9e6172a6fdbfc0405f8 /src/parsetree.h | |
parent | e54d88ee00461f0dc2aead950a232a721ee4644d (diff) | |
download | colm-93dccf445bb3079dfa60d654ea5e56fbcc3f1c54.tar.gz |
allow globals to be declared in namespaces
Diffstat (limited to 'src/parsetree.h')
-rw-r--r-- | src/parsetree.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/parsetree.h b/src/parsetree.h index d6cc246f..f96e83f6 100644 --- a/src/parsetree.h +++ b/src/parsetree.h @@ -823,12 +823,12 @@ struct NameScope { NameScope() : - owner(0), + owningObj(0), parentScope(0), childIter(0) {} - ObjectDef *owner; + ObjectDef *owningObj; FieldMap fieldMap; MethodMap methodMap; @@ -2545,7 +2545,7 @@ struct ObjectDef o->id = id; o->rootScope = new NameScope; - o->rootScope->owner = o; + o->rootScope->owningObj = o; return o; } @@ -2703,6 +2703,8 @@ struct LangVarRef void loadGlobalObj( Compiler *pd, CodeVect &code, int lastPtrInQual, bool forWriting ) const; void loadObj( Compiler *pd, CodeVect &code, int lastPtrInQual, bool forWriting ) const; + void loadScopedObj( Compiler *pd, CodeVect &code, + NameScope *scope, int lastPtrInQual, bool forWriting ) const; void verifyRefPossible( Compiler *pd, VarRefLookup &lookup ) const; bool canTakeRef( Compiler *pd, VarRefLookup &lookup ) const; |