Changeset 140 in dev for BasicCompiler_Common/Variable.h


Ignore:
Timestamp:
Jun 15, 2007, 4:00:25 AM (17 years ago)
Author:
dai_9181
Message:

traceログ機能を搭載
動的メンバをstl::vectorにまとめた
シンボルをクラス化した

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler_Common/Variable.h

    r103 r140  
    22
    33#include "Type.h"
     4#include <Symbol.h>
    45
    56class Variable : public Type
     
    6162    }
    6263
    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;
    6565
    6666    void ConstOff(){
     
    157157    }
    158158
    159     bool DuplicateCheck( const string &varName ) const
     159    bool DuplicateCheck( const Symbol &symbol ) const
    160160    {
    161161        //レキシカルスコープを考慮して重複判定
     
    165165                && var.ScopeLevel == obj_LexScopes.GetNowLevel()    //現在のスコープと同一レベル
    166166                ){
    167                     if( var.IsEqualSymbol( varName ) ){
     167                    if( var.IsEqualSymbol( symbol ) ){
    168168                        return true;
    169169                    }
     
    173173    }
    174174
    175     const Variable *BackSearch( const string &varName ) const
     175    const Variable *BackSearch( const Symbol &symbol ) const
    176176    {
    177177        //レキシカルスコープを考慮してバックサーチ
     
    181181                && var.ScopeLevel <= obj_LexScopes.GetNowLevel()    //現在のスコープレベルを超さないもの(Returnによる解放処理中を考慮)
    182182                ){
    183                     if( var.IsEqualSymbol( varName ) ){
     183                    if( var.IsEqualSymbol( symbol ) ){
    184184                        return &var;
    185185                    }
     
    189189    }
    190190
    191     const Variable *Find( const string &varName )const
     191    const Variable *Find( const Symbol &symbol )const
    192192    {
    193193        int max = (int)this->size();
    194194        for( int i=0; i<max; i++ ){
    195195            Variable *pVar = (*this)[i];
    196             if( pVar->IsEqualSymbol( varName ) ){
     196            if( pVar->IsEqualSymbol( symbol ) ){
    197197                return pVar;
    198198            }
     
    205205
    206206
     207
Note: See TracChangeset for help on using the changeset viewer.