refactor(irgen): 完善irgen代码和文档,提升扩展兼容性
This commit is contained in:
@@ -8,10 +8,10 @@
|
||||
|
||||
class SymbolTable {
|
||||
public:
|
||||
void Add(const std::string& name, SysYParser::VarDeclContext* decl);
|
||||
void Add(const std::string& name, SysYParser::VarDefContext* decl);
|
||||
bool Contains(const std::string& name) const;
|
||||
SysYParser::VarDeclContext* Lookup(const std::string& name) const;
|
||||
SysYParser::VarDefContext* Lookup(const std::string& name) const;
|
||||
|
||||
private:
|
||||
std::unordered_map<std::string, SysYParser::VarDeclContext*> table_;
|
||||
std::unordered_map<std::string, SysYParser::VarDefContext*> table_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user