Ignore:
Timestamp:
May 6, 2007, 3:17:56 PM (17 years ago)
Author:
dai_9181
Message:

Importsステートメントを導入した。実装は作り途中。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler_Common/src/Namespace.cpp

    r105 r107  
    2121}
    2222
     23bool NamespaceScopes::IsImported() const
     24{
     25    BOOST_FOREACH( const NamespaceScopes &namespaceScopes, Smoothie::Meta::importedNamespaces ){
     26        if( this->IsEqual( namespaceScopes ) ){
     27            return true;
     28        }
     29    }
     30    return false;
     31}
    2332bool NamespaceScopes::IsLiving() const
    2433{
     
    9099    lstrcpy( simpleName, fullName + lstrlen( namespaceStr ) + dotLength );
    91100}
     101void NamespaceScopesCollection::Imports( const string &namespaceStr ){
     102    NamespaceScopes namespaceScopes( namespaceStr );
     103    if( !Smoothie::Meta::namespaceScopesCollection.IsExist( namespaceScopes ) ){
     104        SetError(64,namespaceStr.c_str(),cp );
     105        return;
     106    }
     107
     108    this->push_back( namespaceScopes );
     109}
    92110bool NamespaceScopesCollection::CollectNamespaces( const char *source, NamespaceScopesCollection &namespaceScopesCollection )
    93111{
Note: See TracChangeset for help on using the changeset viewer.