diff options
| author | Cori Barker <coribarker2@gmail.com> | 2026-02-22 22:24:27 +0000 |
|---|---|---|
| committer | Cori Barker <coribarker2@gmail.com> | 2026-02-22 22:24:27 +0000 |
| commit | 5c1f937a7eb7a9cc9cd86cb69b3263f41f24408f (patch) | |
| tree | 46154166a56f9a074c5b75dbb1a1b9560908b8f1 /src/semantic/semantic_analyzer.cpp | |
| parent | 2cfc45ff22cd9b6166de3cf963aceede21b358aa (diff) | |
Partially completed lots of changes, refactoring most of the files
Diffstat (limited to 'src/semantic/semantic_analyzer.cpp')
| -rw-r--r-- | src/semantic/semantic_analyzer.cpp | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/semantic/semantic_analyzer.cpp b/src/semantic/semantic_analyzer.cpp deleted file mode 100644 index 57f217e..0000000 --- a/src/semantic/semantic_analyzer.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "semantic/semantic_analyzer.hpp" - -SemanticAnalyzer::SemanticAnalyzer() : symobl_table(new SemanticTable), errors(std::vector<Error>), warnings(std::vector<Error>), current_function(nullptr), current_function_return_type(""), has_main_function(false) {} - -bool SemanticAnalyzer::analyze(ASTNode* ast) { - this->symbol_table.enterScope("global") - this->visit(ast); - this->validateMainFunction(); - - if (has_main_function == false) { - //error - return false; - } - - this->symbol_table.exitScope(); - return true; -} - -std::vector<Error> SemanticAnalyzer::getErrors() { - return this->errors; -} - -std::vector<Error> SemanticAnalyzer::getWarnings() { - return this->warnings; -} - -bool SemanticAnalyzer::hasErrors() { - return !this->errors.empty(); -} - -std::string SemanticAnalyzer::visit(ASTNode* ast) { - -} |
