aboutsummaryrefslogtreecommitdiff
path: root/include/symbol.hpp
diff options
context:
space:
mode:
authorCori Barker <coribarker2@gmail.com>2026-03-07 18:33:21 +0000
committerCori Barker <coribarker2@gmail.com>2026-03-07 18:33:21 +0000
commit50a51df0404ee4f057fbc19657672d1c7d3eef68 (patch)
tree9cb9ed4572a357448f2b78c4ac0add7eaf6a1e7e /include/symbol.hpp
parent6761fdd434a7e54551fe28398361f9eed5268406 (diff)
removed implementations of symbol table related classes, need to fix the parser to use the new AST node classes then i can write the symbol table classes and refactor the lexer and parser to use the symbol table
Diffstat (limited to 'include/symbol.hpp')
-rw-r--r--include/symbol.hpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/symbol.hpp b/include/symbol.hpp
index c3c7ef4..a388f04 100644
--- a/include/symbol.hpp
+++ b/include/symbol.hpp
@@ -1,13 +1,18 @@
#pragma once
+#include "symbol_type.hpp"
+#include "type.hpp"
+
+#include <variant>
+#include <string>
+
class Symbol {
public:
explicit Symbol();
private:
std::string identifier;
- Type type;
+
+ SymbolType symbol_type;
std::variant<int, bool, std::string> value;
};
-
-Symbol::Symbol(std::string identifier, Type type, std::variant<int, bool, std::string> value) : identifier(identifier), type(type), value(value) { }