Changeset 140 in dev for BasicCompiler_Common/Variable.h
- Timestamp:
- Jun 15, 2007, 4:00:25 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/Variable.h
r103 r140 2 2 3 3 #include "Type.h" 4 #include <Symbol.h> 4 5 5 6 class Variable : public Type … … 61 62 } 62 63 63 bool IsEqualSymbol( const NamespaceScopes &namespaceScopes, const string &name ) const; 64 bool IsEqualSymbol( const string &name ) const; 64 bool IsEqualSymbol( const Symbol &symbol, bool isSupportStaticMember = true ) const; 65 65 66 66 void ConstOff(){ … … 157 157 } 158 158 159 bool DuplicateCheck( const string &varName) const159 bool DuplicateCheck( const Symbol &symbol ) const 160 160 { 161 161 //レキシカルスコープを考慮して重複判定 … … 165 165 && var.ScopeLevel == obj_LexScopes.GetNowLevel() //現在のスコープと同一レベル 166 166 ){ 167 if( var.IsEqualSymbol( varName) ){167 if( var.IsEqualSymbol( symbol ) ){ 168 168 return true; 169 169 } … … 173 173 } 174 174 175 const Variable *BackSearch( const string &varName) const175 const Variable *BackSearch( const Symbol &symbol ) const 176 176 { 177 177 //レキシカルスコープを考慮してバックサーチ … … 181 181 && var.ScopeLevel <= obj_LexScopes.GetNowLevel() //現在のスコープレベルを超さないもの(Returnによる解放処理中を考慮) 182 182 ){ 183 if( var.IsEqualSymbol( varName) ){183 if( var.IsEqualSymbol( symbol ) ){ 184 184 return &var; 185 185 } … … 189 189 } 190 190 191 const Variable *Find( const string &varName)const191 const Variable *Find( const Symbol &symbol )const 192 192 { 193 193 int max = (int)this->size(); 194 194 for( int i=0; i<max; i++ ){ 195 195 Variable *pVar = (*this)[i]; 196 if( pVar->IsEqualSymbol( varName) ){196 if( pVar->IsEqualSymbol( symbol ) ){ 197 197 return pVar; 198 198 } … … 205 205 206 206 207
Note:
See TracChangeset
for help on using the changeset viewer.