Ignore:
Timestamp:
May 5, 2008, 9:41:23 AM (16 years ago)
Author:
dai_9181
Message:

エラーコード138をLexicalAnalyzer_Class.cppで表示するようにした。

Location:
trunk/ab5.0/abdev/BasicCompiler_Common
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/BasicCompiler_Common/include/Class.h

    r540 r557  
    316316
    317317    // インターフェイス実装
    318     bool Implements( const CClass &interfaceClass, const Types &actualTypeParameters, int nowLine );
     318    void Implements( const CClass &interfaceClass, const Types &actualTypeParameters, int nowLine );
    319319
    320320    //メンバ、メソッドの追加
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/Class.cpp

    r540 r557  
    185185}
    186186
    187 bool CClass::Implements( const CClass &interfaceClass, const Types &actualTypeParameters, int nowLine )
    188 {
    189     if( !interfaceClass.IsInterface() && !interfaceClass.IsComInterface() )
    190     {
    191         // インターフェイスではないとき
    192         compiler.errorMessenger.Output(138,interfaceClass.GetName().c_str(),nowLine );
    193         return false;
    194     }
    195 
     187void CClass::Implements( const CClass &interfaceClass, const Types &actualTypeParameters, int nowLine )
     188{
    196189    ::Interface *pDestInterface = new ::Interface( &interfaceClass, actualTypeParameters );
    197190
     
    257250        );
    258251    }
    259 
    260 
    261     return true;
    262252}
    263253
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Class.cpp

    r546 r557  
    509509        }
    510510
    511         // インターフェイスを継承する
    512         currentClass.Implements( *pInterfaceClass, actualTypeParameters, nowLine );
     511        if( pInterfaceClass->IsInterface() || pInterfaceClass->IsComInterface() )
     512        {
     513            // インターフェイスを継承する
     514            currentClass.Implements( *pInterfaceClass, actualTypeParameters, nowLine );
     515        }
     516        else
     517        {
     518            // インターフェイスではないとき
     519            compiler.errorMessenger.Output(138,pInterfaceClass->GetName().c_str(),nowLine );
     520        }
    513521    }
    514522
Note: See TracChangeset for help on using the changeset viewer.