diff options
| author | gingerBill <bill@gingerbill.org> | 2021-05-19 13:02:44 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-05-19 13:02:44 +0100 |
| commit | 5108ebf015e460e9c226a2067f6109785a20a143 (patch) | |
| tree | 4824e07a5757ce747f9a0604082dc88f0d4ac031 /src/parser.cpp | |
| parent | 86dbcb1b20e7a5575013f2acbf0f48d194595d27 (diff) | |
Replace `error` calls with `Token` to use `TokenPos`
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index 77ce7ea70..b8d53e724 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -479,7 +479,7 @@ void error(Ast *node, char const *fmt, ...) { } va_list va; va_start(va, fmt); - error_va(token, fmt, va); + error_va(token.pos, fmt, va); va_end(va); if (node != nullptr && node->file != nullptr) { node->file->error_count += 1; @@ -493,7 +493,7 @@ void error_no_newline(Ast *node, char const *fmt, ...) { } va_list va; va_start(va, fmt); - error_no_newline_va(token, fmt, va); + error_no_newline_va(token.pos, fmt, va); va_end(va); if (node != nullptr && node->file != nullptr) { node->file->error_count += 1; @@ -503,14 +503,14 @@ void error_no_newline(Ast *node, char const *fmt, ...) { void warning(Ast *node, char const *fmt, ...) { va_list va; va_start(va, fmt); - warning_va(ast_token(node), fmt, va); + warning_va(ast_token(node).pos, fmt, va); va_end(va); } void syntax_error(Ast *node, char const *fmt, ...) { va_list va; va_start(va, fmt); - syntax_error_va(ast_token(node), fmt, va); + syntax_error_va(ast_token(node).pos, fmt, va); va_end(va); if (node != nullptr && node->file != nullptr) { node->file->error_count += 1; |