Ignore:
Timestamp:
May 6, 2008, 8:31:52 PM (16 years ago)
Author:
dai_9181
Message:

Variables::DuplicateCheck、Variables::BackSearchメソッドにnowScopeLevelパラメータを追加した。

File:
1 edited

Legend:

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

    r564 r570  
    565565        /////////////////
    566566
    567         pVar = compiler.GetCompilingUserProc().GetLocalVars().BackSearch( LexicalAnalyzer::FullNameToSymbol( VarName ) );
     567        pVar = compiler.GetCompilingUserProc().GetLocalVars().BackSearch(
     568            LexicalAnalyzer::FullNameToSymbol( VarName ),
     569            compiler.codeGenerator.lexicalScopes.GetNowLevel()
     570        );
    568571        if( pVar ){
    569572            goto ok;
     
    669672    ////////////////////
    670673
    671     pVar = compiler.GetObjectModule().meta.GetGlobalVars().BackSearch( LexicalAnalyzer::FullNameToSymbol( VarName ) );
     674    pVar = compiler.GetObjectModule().meta.GetGlobalVars().BackSearch(
     675        LexicalAnalyzer::FullNameToSymbol( VarName ),
     676        compiler.codeGenerator.lexicalScopes.GetNowLevel()
     677    );
    672678    if( pVar ){
    673679        goto ok;
     
    943949    /////////////////////////
    944950
    945     if( compiler.GetObjectModule().meta.GetGlobalVars().DuplicateCheck( LexicalAnalyzer::FullNameToSymbol( name ) ) ){
     951    if( compiler.GetObjectModule().meta.GetGlobalVars().DuplicateCheck( LexicalAnalyzer::FullNameToSymbol( name ), compiler.codeGenerator.lexicalScopes.GetNowLevel() ) ){
    946952        //2重定義のエラー
    947953        compiler.errorMessenger.Output(15,name,cp);
Note: See TracChangeset for help on using the changeset viewer.