Changeset 88 in dev for BasicCompiler_Common/include
- Timestamp:
- Apr 2, 2007, 12:10:02 AM (18 years ago)
- Location:
- BasicCompiler_Common/include
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/include/Smoothie.h
r87 r88 4 4 #include "../TypeDef.h" 5 5 6 class House{6 class Smoothie{ 7 7 public: 8 8 -
BasicCompiler_Common/include/Source.h
r87 r88 16 16 public: 17 17 18 enum ReturnLineChar{19 CR,20 LF,21 CRLF,22 };23 24 18 Text(){ 25 19 buffer = (char *)calloc( 1, 1 ); … … 31 25 32 26 bool ReadFile( const string &filePath ); 33 34 void ChangeReturnLineChar();35 36 char *Buffer(){37 return buffer;38 }39 int Length(){40 return length;41 }42 27 }; 43 28 44 29 class BasicSource : public Text 45 30 { 31 void Realloc( int newLength ){ 32 buffer = (char *)realloc( buffer, newLength + 255 ); 33 34 length = newLength; 35 36 extern char *basbuf; 37 basbuf = buffer + 2; 38 } 39 40 void IncludeFiles(); 41 42 void ChangeReturnLineChar(); 43 44 void RemoveComments(); 45 46 bool ReadFile_InIncludeDirective( const string &filePath ); 47 void DirectiveIncludeOrRequire(); 48 49 void RemoveReturnLineUnderbar(); 50 46 51 public: 47 52 BasicSource(){} 48 53 ~BasicSource(){} 49 54 50 void RemoveComments(); 55 char *GetBuffer(){ 56 return buffer+2; 57 } 58 int GetLength(){ 59 return length-2; 60 } 51 61 52 void DirectiveIfdef(); 53 void DirectiveIncludeOrRequire(); 62 void SetBuffer( const char *buffer ); 54 63 55 void RemoveReturnLineUnderbar(); 56 57 void FormatDefStatement(); 58 void FormatIfStatement(); 64 bool ReadFile( const string &filePath ); 59 65 60 66 bool Generate( const string &genName, const char *buffer ); 67 68 void Addition( const char *buffer ); 69 70 void operator = ( const BasicSource &source ){ 71 Realloc( source.length ); 72 lstrcpy( buffer, source.buffer ); 73 } 61 74 };
Note:
See TracChangeset
for help on using the changeset viewer.