Added bytecode output.
This commit is contained in:
@ -43,12 +43,7 @@ public:
|
||||
class Symbol
|
||||
{
|
||||
public:
|
||||
Symbol(SymbolType t, const char *s, int l);
|
||||
const char *GetSymbol() { return sym.c_str(); }
|
||||
SymbolType GetType() { return type; }
|
||||
int GetLine() { return line; }
|
||||
int IsEqual(std::string &s);
|
||||
private:
|
||||
bool IsEqual(std::string &s);
|
||||
SymbolType type;
|
||||
std::string sym;
|
||||
int line;
|
||||
@ -56,9 +51,11 @@ public:
|
||||
|
||||
public:
|
||||
~SymbolList();
|
||||
SymbolList::Symbol* AddSymbol(const char *s, SymbolType type, int line);
|
||||
SymbolList::Symbol* AddSymbol(std::string &sym, SymbolType type, int line);
|
||||
SymbolList::Symbol* AddSymbol(const char *szSym, SymbolType type, int line);
|
||||
SymbolList::Symbol* FindSymbol(std::string &sym);
|
||||
void PrintTable();
|
||||
void Clear();
|
||||
private:
|
||||
std::vector<Symbol*> List;
|
||||
};
|
||||
|
Reference in New Issue
Block a user