Changeset 173 in dev for trunk/jenga/include/smoothie
- Timestamp:
- Jun 20, 2007, 3:38:44 AM (17 years ago)
- Location:
- trunk/jenga/include/smoothie
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/jenga/include/smoothie/Class.h
r172 r173 4 4 #include "Member.h" 5 5 #include "Method.h" 6 #include "LexicalAnalysis.h" 6 7 7 8 class InheritedInterface … … 120 121 bool IsDelegate() const; 121 122 bool IsStructure() const; 123 void SetClassType( ClassType classType ) 124 { 125 this->classType = classType; 126 } 122 127 123 128 //継承させる … … 248 253 for( int i=0; desc[i]; i++ ){ 249 254 if( desc[i] == '(' ){ 250 i= BasicSource::JumpStringInPare(desc,i+1);255 i=JumpStringInPare(desc,i+1); 251 256 continue; 252 257 } 253 258 else if( desc[i] == '[' ){ 254 i= BasicSource::JumpStringInBracket(desc,i+1);259 i=JumpStringInBracket(desc,i+1); 255 260 continue; 256 261 } … … 296 301 Classes(); 297 302 ~Classes(); 303 void Clear(); 298 304 299 305 const CClass *Find( const string &fullName ) const; -
trunk/jenga/include/smoothie/Source.h
r170 r173 34 34 bool ReadFile( const string &filePath ); 35 35 36 static bool IsBlank( char c )37 {38 if( c == ' ' || c == '\t' )39 {40 return true;41 }42 return false;43 }44 36 static void Text::SlideString(char *buffer, int slide){ 45 37 char *temp; … … 82 74 return buffer+2; 83 75 } 84 int GetLength(){ 76 const char *GetBuffer() const 77 { 78 return buffer+2; 79 } 80 int GetLength() const 81 { 85 82 return length-2; 86 83 } … … 99 96 } 100 97 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"; 104 103 } 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]; 144 105 } 145 106 }; -
trunk/jenga/include/smoothie/Type.h
r172 r173 139 139 static bool StringToBasicType( const std::string &typeName, int &basicType ); 140 140 static bool StringToType( const std::string &typeName, Type &type ); 141 static int GetBasicTypeFromSimpleName( const char *variable ); 141 142 }; 142 143 -
trunk/jenga/include/smoothie/TypeDef.h
r170 r173 20 20 Type baseType; 21 21 public: 22 TypeDef( const NamespaceScopes &namespaceScopes, const string &name, const string &baseName );22 TypeDef( const NamespaceScopes &namespaceScopes, const string &name, const string &baseName, int nowLine ); 23 23 ~TypeDef(); 24 24 … … 46 46 ~TypeDefCollection(); 47 47 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 ); 49 49 int GetIndex( const NamespaceScopes &namespaceScopes, const string &name ) const; 50 50 int GetIndex( const string &fullName ) const; -
trunk/jenga/include/smoothie/Variable.h
r172 r173 176 176 177 177 extern Variables globalVars; 178 179 180
Note:
See TracChangeset
for help on using the changeset viewer.