Changeset 173 in dev for trunk/jenga/include


Ignore:
Timestamp:
Jun 20, 2007, 3:38:44 AM (17 years ago)
Author:
dai_9181
Message:
 
Location:
trunk/jenga/include/smoothie
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/jenga/include/smoothie/Class.h

    r172 r173  
    44#include "Member.h"
    55#include "Method.h"
     6#include "LexicalAnalysis.h"
    67
    78class InheritedInterface
     
    120121    bool IsDelegate() const;
    121122    bool IsStructure() const;
     123    void SetClassType( ClassType classType )
     124    {
     125        this->classType = classType;
     126    }
    122127
    123128    //継承させる
     
    248253        for( int i=0; desc[i]; i++ ){
    249254            if( desc[i] == '(' ){
    250                 i=BasicSource::JumpStringInPare(desc,i+1);
     255                i=JumpStringInPare(desc,i+1);
    251256                continue;
    252257            }
    253258            else if( desc[i] == '[' ){
    254                 i=BasicSource::JumpStringInBracket(desc,i+1);
     259                i=JumpStringInBracket(desc,i+1);
    255260                continue;
    256261            }
     
    296301    Classes();
    297302    ~Classes();
     303    void Clear();
    298304
    299305    const CClass *Find( const string &fullName ) const;
  • trunk/jenga/include/smoothie/Source.h

    r170 r173  
    3434    bool ReadFile( const string &filePath );
    3535
    36     static bool IsBlank( char c )
    37     {
    38         if( c == ' ' || c == '\t' )
    39         {
    40             return true;
    41         }
    42         return false;
    43     }
    4436    static void Text::SlideString(char *buffer, int slide){
    4537        char *temp;
     
    8274        return buffer+2;
    8375    }
    84     int GetLength(){
     76    const char *GetBuffer() const
     77    {
     78        return buffer+2;
     79    }
     80    int GetLength() const
     81    {
    8582        return length-2;
    8683    }
     
    9996    }
    10097
    101     static bool IsCommandDelimitation( char c ){
    102         if( c == '\n' || c == ':' || c == '\0' ){
    103             return true;
     98    char operator[]( int index ) const
     99    {
     100        if( index>GetLength() )
     101        {
     102            throw "bad access";
    104103        }
    105 
    106         return false;
    107     }
    108 
    109     static int JumpStringInPare(const char *buffer,int pos){
    110         int PareNum;
    111         for(PareNum=1;;pos++){
    112             if(buffer[pos]=='\"'){
    113                 for(pos++;;pos++){
    114                     if(buffer[pos]=='\"') break;
    115                 }
    116                 continue;
    117             }
    118             else if(buffer[pos]=='(') PareNum++;
    119             else if(buffer[pos]==')'){
    120                 PareNum--;
    121                 if(PareNum==0) return pos;
    122             }
    123             else if(buffer[pos]=='\0') break;
    124         }
    125         return 0;
    126     }
    127     static int JumpStringInBracket(const char *buffer,int pos){
    128         int PareNum;
    129         for(PareNum=1;;pos++){
    130             if(buffer[pos]=='\"'){
    131                 for(pos++;;pos++){
    132                     if(buffer[pos]=='\"') break;
    133                 }
    134                 continue;
    135             }
    136             else if(buffer[pos]=='[') PareNum++;
    137             else if(buffer[pos]==']'){
    138                 PareNum--;
    139                 if(PareNum==0) return pos;
    140             }
    141             else if(buffer[pos]=='\0') break;
    142         }
    143         return 0;
     104        return buffer[2+index];
    144105    }
    145106};
  • trunk/jenga/include/smoothie/Type.h

    r172 r173  
    139139    static bool StringToBasicType( const std::string &typeName, int &basicType );
    140140    static bool StringToType( const std::string &typeName, Type &type );
     141    static int GetBasicTypeFromSimpleName( const char *variable );
    141142};
    142143
  • trunk/jenga/include/smoothie/TypeDef.h

    r170 r173  
    2020    Type baseType;
    2121public:
    22     TypeDef( const NamespaceScopes &namespaceScopes, const string &name, const string &baseName );
     22    TypeDef( const NamespaceScopes &namespaceScopes, const string &name, const string &baseName, int nowLine );
    2323    ~TypeDef();
    2424
     
    4646    ~TypeDefCollection();
    4747
    48     void Add( const NamespaceScopes &namespaceScopes, const string &name, const string &baseName );
     48    void Add( const NamespaceScopes &namespaceScopes, const string &name, const string &baseName, int nowLine );
    4949    int GetIndex( const NamespaceScopes &namespaceScopes, const string &name ) const;
    5050    int GetIndex( const string &fullName ) const;
  • trunk/jenga/include/smoothie/Variable.h

    r172 r173  
    176176
    177177extern Variables globalVars;
    178 
    179 
    180 
Note: See TracChangeset for help on using the changeset viewer.