Ignore:
Timestamp:
Apr 30, 2008, 8:04:04 PM (16 years ago)
Author:
dai_9181
Message:

幾つかの構文解析系の処理をLexicalAnalyzerに実装し直した

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/Variable.cpp

    r461 r511  
    44#include <Variable.h>
    55
    6 /*
    7 TODO: 消す
    8 bool Variable::IsEqualSymbol( const Symbol &symbol, bool isSupportStaticMember ) const
     6Variable::Variable( const string &name, const Type &type, bool isConst, bool isRef, const std::string &paramStrForConstructor, 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 )
    915{
    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}
     17Variable::Variable( const NamespaceScopes &namespaceScopes, const string &name, const Type &type, bool isConst, bool isRef, const std::string &paramStrForConstructor, 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}
     28Variable::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}
     40Variable::Variable()
     41{
     42}
    2743
    2844
Note: See TracChangeset for help on using the changeset viewer.