Changeset 107 in dev for BasicCompiler_Common/src


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

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

Location:
BasicCompiler_Common/src
Files:
2 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{
  • BasicCompiler_Common/src/Smoothie.cpp

    r105 r107  
    22
    33string Smoothie::Logger::log = "";
     4
     5void Smoothie::Logger::Put( const string &text )
     6{
     7//#ifdef _DEBUG
     8    log += text + "\r\n";
     9
     10    {
     11        ofstream ofs( ( (string)BasicSystemDir + "Log\\compile.log" ).c_str(), ios_base::app );
     12        ofs << text << endl;
     13        ofs.close();
     14    }
     15//#endif
     16}
    417
    518BasicSource Smoothie::Lexical::source;
     
    922vector<ProcPointer *> Smoothie::Meta::procPointers;
    1023NamespaceScopesCollection Smoothie::Meta::namespaceScopesCollection;
     24NamespaceScopesCollection Smoothie::Meta::importedNamespaces;
Note: See TracChangeset for help on using the changeset viewer.