diff options
| author | Cori Barker <coribarker2@gmail.com> | 2026-03-07 17:46:38 +0000 |
|---|---|---|
| committer | Cori Barker <coribarker2@gmail.com> | 2026-03-07 17:46:38 +0000 |
| commit | 6761fdd434a7e54551fe28398361f9eed5268406 (patch) | |
| tree | 43f752cc165f6c13b1204dd0e82a219c0d2df4c3 /include/scope.hpp | |
| parent | 32ee1c8be581e1967950e125551d672ff65cb04b (diff) | |
code is a complete mess, simplified some classes as they are way too complex will expand in future but too complicated for now since its the first version.
Diffstat (limited to 'include/scope.hpp')
| -rw-r--r-- | include/scope.hpp | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/include/scope.hpp b/include/scope.hpp index ff20542..7d66f0f 100644 --- a/include/scope.hpp +++ b/include/scope.hpp @@ -1,23 +1,11 @@ #pragma once -#include <string> -#include <memory> - class Scope { public: - explicit Scope(std::string name, int level, *Scope parent); - std::string getScopeName(); - int getScopeLevel(); - *Scope getParentScope(); - void define(Symbol symbol); - *Symbol lookup(std::string name); - bool isDeclared(std::string name); - std::unordered_map<std::string, Symbol> getAllSymbols(); - std::string toString(); + explicit Scope(int scope_level); private: - std::string scope_name; - int scope_level - *Scope parent_scope; - std::unordered_map<std::string, Symbol> symbols; + std::vector<Symbol> symbols; + int scope_level; + }; |
