aboutsummaryrefslogtreecommitdiff
path: root/src/parser.hpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-01-15 16:15:03 +0000
committergingerBill <bill@gingerbill.org>2021-01-15 16:15:03 +0000
commitc653e400dbb011965583a34951763173b0fc7969 (patch)
treefe9e8c6561b7f5156652b07997f067d920b3fa92 /src/parser.hpp
parente884f8c165fac7df366a95e5b8f565a375199233 (diff)
Add extra error checking in parser.cpp
Diffstat (limited to 'src/parser.hpp')
-rw-r--r--src/parser.hpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/parser.hpp b/src/parser.hpp
index cd0d59a48..da363bee9 100644
--- a/src/parser.hpp
+++ b/src/parser.hpp
@@ -41,6 +41,7 @@ enum ParseFileError {
ParseFile_Permission,
ParseFile_NotFound,
ParseFile_InvalidToken,
+ ParseFile_GeneralError,
ParseFile_Count,
};
@@ -102,10 +103,11 @@ struct AstFile {
Array<Ast *> imports; // 'import'
isize directive_count;
- Ast * curr_proc;
- isize error_count;
- f64 time_to_tokenize; // seconds
- f64 time_to_parse; // seconds
+ Ast * curr_proc;
+ isize error_count;
+ ParseFileError last_error;
+ f64 time_to_tokenize; // seconds
+ f64 time_to_parse; // seconds
bool is_test;