diff options
| author | gingerBill <bill@gingerbill.org> | 2019-03-24 19:12:41 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-03-24 19:12:41 +0000 |
| commit | 2ada90e0941a0d4bd6149cc748347aa04487d1b5 (patch) | |
| tree | a46995b4e9aaa0f4566b98e5cd59cf52b1bbb200 /src/parser.cpp | |
| parent | a137a06b00c4379f4c80f7dfcaefd3ee23e83270 (diff) | |
Improve a tokenizer error message; Add extra tokens for `in` and `notin` for fun!
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index 84c03587d..2eee82e22 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -4539,6 +4539,7 @@ ParseFileError process_imported_file(Parser *p, ImportedFile imported_file) { TokenPos err_pos = {0}; ParseFileError err = init_ast_file(file, fi->fullpath, &err_pos); + err_pos.file = fi->fullpath; if (err != ParseFile_None) { if (err == ParseFile_EmptyFile) { @@ -4563,7 +4564,7 @@ ParseFileError process_imported_file(Parser *p, ImportedFile imported_file) { error(pos, "Failed to parse file: %.*s; file cannot be found ('%.*s')", LIT(fi->name), LIT(fi->fullpath)); break; case ParseFile_InvalidToken: - error(pos, "Failed to parse file: %.*s; invalid token found in file at (%td:%td)", LIT(fi->name), err_pos.line, err_pos.column); + error(err_pos, "Failed to parse file: %.*s; invalid token found in file", LIT(fi->name)); break; case ParseFile_EmptyFile: error(pos, "Failed to parse file: %.*s; file contains no tokens", LIT(fi->name)); |