Changeset 88 in dev for BasicCompiler_Common/include


Ignore:
Timestamp:
Apr 2, 2007, 12:10:02 AM (18 years ago)
Author:
dai_9181
Message:

House→Smoothie
Sourceクラスを用意した。

Location:
BasicCompiler_Common/include
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • BasicCompiler_Common/include/Smoothie.h

    r87 r88  
    44#include "../TypeDef.h"
    55
    6 class House{
     6class Smoothie{
    77public:
    88
  • BasicCompiler_Common/include/Source.h

    r87 r88  
    1616public:
    1717
    18     enum ReturnLineChar{
    19         CR,
    20         LF,
    21         CRLF,
    22     };
    23 
    2418    Text(){
    2519        buffer = (char *)calloc( 1, 1 );
     
    3125
    3226    bool ReadFile( const string &filePath );
    33 
    34     void ChangeReturnLineChar();
    35 
    36     char *Buffer(){
    37         return buffer;
    38     }
    39     int Length(){
    40         return length;
    41     }
    4227};
    4328
    4429class BasicSource : public Text
    4530{
     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
    4651public:
    4752    BasicSource(){}
    4853    ~BasicSource(){}
    4954
    50     void RemoveComments();
     55    char *GetBuffer(){
     56        return buffer+2;
     57    }
     58    int GetLength(){
     59        return length-2;
     60    }
    5161
    52     void DirectiveIfdef();
    53     void DirectiveIncludeOrRequire();
     62    void SetBuffer( const char *buffer );
    5463
    55     void RemoveReturnLineUnderbar();
    56 
    57     void FormatDefStatement();
    58     void FormatIfStatement();
     64    bool ReadFile( const string &filePath );
    5965
    6066    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    }
    6174};
Note: See TracChangeset for help on using the changeset viewer.