aboutsummaryrefslogtreecommitdiff
path: root/include/semantic/scope.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/semantic/scope.h')
-rw-r--r--include/semantic/scope.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/semantic/scope.h b/include/semantic/scope.h
index aa13fe3..ff20542 100644
--- a/include/semantic/scope.h
+++ b/include/semantic/scope.h
@@ -5,12 +5,12 @@
class Scope {
public:
- explicit Scope(std::string name, int level, std::unique_ptr<Scope> parent);
+ explicit Scope(std::string name, int level, *Scope parent);
std::string getScopeName();
int getScopeLevel();
- std::unique_ptr<Scope> getParentScope();
+ *Scope getParentScope();
void define(Symbol symbol);
- std::unique_ptr<Symbol> lookup(std::string name);
+ *Symbol lookup(std::string name);
bool isDeclared(std::string name);
std::unordered_map<std::string, Symbol> getAllSymbols();
std::string toString();
@@ -18,6 +18,6 @@ public:
private:
std::string scope_name;
int scope_level
- std::unique_ptr<Scope> parent_scope;
- std::unordered_map<std::string, Symbol>;
+ *Scope parent_scope;
+ std::unordered_map<std::string, Symbol> symbols;
};