Ignore:
Timestamp:
May 7, 2008, 11:52:29 AM (16 years ago)
Author:
dai_9181
Message:

UserProcs::Insertメソッドを排除。

File:
1 edited

Legend:

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

    r566 r574  
    590590        pUserProc->_paramStr = "";
    591591        pUserProc->Using();
    592         compiler.GetObjectModule().meta.GetUserProcs().Insert( pUserProc, -1 );
     592
     593        // 関数を追加
     594        if( compiler.GetObjectModule().meta.GetUserProcs().IsExist( pUserProc ) )
     595        {
     596            // 既に存在している
     597            compiler.errorMessenger.Output(15,pUserProc->GetName(),-1);
     598
     599            delete pUserProc;
     600        }
     601        else
     602        {
     603            compiler.GetObjectModule().meta.GetUserProcs().Put( pUserProc );
     604        }
    593605
    594606        LexicalAnalyzer::AddMethod(
     
    905917                if( pUserProc )
    906918                {
    907                     compiler.GetObjectModule().meta.GetUserProcs().Insert( pUserProc, i );
     919                    // 関数を追加
     920                    if( compiler.GetObjectModule().meta.GetUserProcs().IsExist( pUserProc ) )
     921                    {
     922                        // 既に存在している
     923                        compiler.errorMessenger.Output(15,pUserProc->GetName(),i);
     924
     925                        delete pUserProc;
     926                    }
     927                    else
     928                    {
     929                        compiler.GetObjectModule().meta.GetUserProcs().Put( pUserProc );
     930                    }
    908931
    909932                    //メンバ関数を追加
     
    12331256                    if( pUserProc )
    12341257                    {
    1235                         compiler.GetObjectModule().meta.GetUserProcs().Insert( pUserProc, i );
     1258                        // 関数を追加
     1259                        if( compiler.GetObjectModule().meta.GetUserProcs().IsExist( pUserProc ) )
     1260                        {
     1261                            // 既に存在している
     1262                            compiler.errorMessenger.Output(15,pUserProc->GetName(),i);
     1263
     1264                            delete pUserProc;
     1265                        }
     1266                        else
     1267                        {
     1268                            compiler.GetObjectModule().meta.GetUserProcs().Put( pUserProc );
     1269                        }
    12361270
    12371271                        //メソッドを追加
Note: See TracChangeset for help on using the changeset viewer.