Changeset 511 in dev for trunk/ab5.0/abdev/BasicCompiler_Common/src/Variable.cpp
- Timestamp:
- Apr 30, 2008, 8:04:04 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/src/Variable.cpp
r461 r511 4 4 #include <Variable.h> 5 5 6 /* 7 TODO: 消す 8 bool Variable::IsEqualSymbol( const Symbol &symbol, bool isSupportStaticMember ) const 6 Variable::Variable( const string &name, const Type &type, bool isConst, bool isRef, const std::string ¶mStrForConstructor, bool hasInitData ) 7 : Symbol( ActiveBasic::Compiler::LexicalAnalyzer::FullNameToSymbol( name ) ) 8 , type( type ) 9 , isConst( isConst ) 10 , isRef( isRef ) 11 , isArray( false ) 12 , isParameter( false) 13 , paramStrForConstructor( paramStrForConstructor ) 14 , hasInitData( hasInitData ) 9 15 { 10 if( GetName() == symbol.GetName() 11 && compiler.GetNamespaceSupporter().IsSameAreaNamespace( this->GetNamespaceScopes(), symbol.GetNamespaceScopes() ) ) 12 { 13 return true; 14 } 15 16 if( isSupportStaticMember && symbol.GetNamespaceScopes().size() >= 1 ) 17 { 18 // 静的メンバを考慮 19 NamespaceScopes namespaceScopes( symbol.GetNamespaceScopes() ); 20 string name = namespaceScopes[namespaceScopes.size()-1] + "." + symbol.GetName(); 21 namespaceScopes.pop_back(); 22 23 return IsEqualSymbol( Symbol( namespaceScopes, name ), false ); 24 } 25 return false; 26 }*/ 16 } 17 Variable::Variable( const NamespaceScopes &namespaceScopes, const string &name, const Type &type, bool isConst, bool isRef, const std::string ¶mStrForConstructor, bool hasInitData ) 18 : Symbol( namespaceScopes, name ) 19 , type( type ) 20 , isConst( isConst ) 21 , isRef( isRef ) 22 , isArray( false ) 23 , isParameter( false) 24 , paramStrForConstructor( paramStrForConstructor ) 25 , hasInitData( hasInitData ) 26 { 27 } 28 Variable::Variable( const Variable &var ) 29 : Symbol( var ) 30 , type( var.type ) 31 , isConst( var.isConst ) 32 , isRef( var.isRef ) 33 , isArray( var.isArray ) 34 , subscripts( var.subscripts ) 35 , isParameter( false ) 36 , paramStrForConstructor( var.paramStrForConstructor ) 37 , hasInitData( var.hasInitData ) 38 { 39 } 40 Variable::Variable() 41 { 42 } 27 43 28 44
Note:
See TracChangeset
for help on using the changeset viewer.