mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-18 04:48:44 +00:00
fixes, more information in errors
This commit is contained in:
parent
a11ddbd25f
commit
b686fe00fb
10 changed files with 356 additions and 65 deletions
|
|
@ -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>();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue