aboutsummaryrefslogtreecommitdiff
path: root/include/symbol_table.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/symbol_table.hpp')
-rw-r--r--include/symbol_table.hpp21
1 files changed, 4 insertions, 17 deletions
diff --git a/include/symbol_table.hpp b/include/symbol_table.hpp
index b2b8270..55de65a 100644
--- a/include/symbol_table.hpp
+++ b/include/symbol_table.hpp
@@ -2,24 +2,11 @@
class SymbolTable {
public:
- explicit SymbolTable();
- ~SymbolTable() = default;
- void enterScope(std::string scope_name);
- void exitScope();
- Scope* getCurrentScope();
- Scope* getGlobalScope();
- int getScopeLevel();
- void insert(Symbol symbol);
- Symbol* lookup(std::string name);
- Symbol* lookupCurrentScope(std::string name);
- bool isDeclared(std::string name);
- bool isDeclaredInCurrentScope(std::string name);
- void display();
- std::string toString();
+
private:
- std::vector<std::unique_ptr<Scope>> scopes;
+ std::vector<Scope> scopes;
Scope* current_scope;
- int scope_level;
- Scope* global_scope;
+
+
};