fixes, more information in errors

This commit is contained in:
ProgramSnail 2023-05-05 11:59:02 +03:00
parent a11ddbd25f
commit b686fe00fb
10 changed files with 356 additions and 65 deletions

View file

@ -7,6 +7,7 @@
#include "../include/interpreter_tree.hpp"
#include "../include/build_visitor.hpp"
#include "../include/print_visitor.hpp"
#include "../include/error_handling.hpp"
int main(int argc, char** argv) { // TODO, only test version
if (argc < 2 || argc > 2) {
@ -29,6 +30,10 @@ int main(int argc, char** argv) { // TODO, only test version
parser::ParseTree parse_tree(source);
if (!parse_tree.IsProperlyParsed()) {
error_handling::HandleParsingError("There are some parsing errors in file.", {0, 0});
}
std::unique_ptr<interpreter::tokens::SourceFile> source_file =
std::make_unique<interpreter::tokens::SourceFile>();