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_Procedure.cpp

    r573 r574  
    872872
    873873            UserProc *pUserProc = ParseUserProc( namespaceScopes, importedNamespaces, temporary, i, false, NULL, false );
    874             userProcs.Insert( pUserProc, i );
     874
     875            // 関数を追加
     876            if( userProcs.IsExist( pUserProc ) )
     877            {
     878                // 既に存在している
     879                compiler.errorMessenger.Output(15,pUserProc->GetName(),i);
     880
     881                delete pUserProc;
     882            }
     883            else
     884            {
     885                userProcs.Put( pUserProc );
     886            }
    875887
    876888            /*  Sub ~ End Sub
     
    906918    sprintf(temporary,"%c%c%s()",1,ESC_SUB,compiler.globalAreaProcName.c_str());
    907919    UserProc *pUserProc = ParseUserProc( namespaceScopes, importedNamespaces, temporary, 0, false, NULL, false );
    908     userProcs.Insert( pUserProc, i );
     920
     921    // 関数を追加
     922    if( userProcs.IsExist( pUserProc ) )
     923    {
     924        // 既に存在している
     925        compiler.errorMessenger.Output(15,pUserProc->GetName(),i);
     926
     927        delete pUserProc;
     928    }
     929    else
     930    {
     931        userProcs.Put( pUserProc );
     932    }
    909933}
Note: See TracChangeset for help on using the changeset viewer.