diff options
| author | gingerBill <bill@gingerbill.org> | 2019-10-13 16:06:41 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-10-13 16:06:41 +0100 |
| commit | b53fe14c22fe2e7063979353735ca0aa5b0e2605 (patch) | |
| tree | 790d180ba6bf657b9d62a288f7c0b0cd7ad2b5ce /src/tokenizer.cpp | |
| parent | 45683703ea6cc0578796c891b50bad1c75ecc687 (diff) | |
Change `error` to `syntax_error` in parser
Diffstat (limited to 'src/tokenizer.cpp')
| -rw-r--r-- | src/tokenizer.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tokenizer.cpp b/src/tokenizer.cpp index d5e04aa1e..4b0db7ac4 100644 --- a/src/tokenizer.cpp +++ b/src/tokenizer.cpp @@ -401,6 +401,15 @@ void syntax_error(Token token, char *fmt, ...) { va_end(va); } +void syntax_error(TokenPos pos, char *fmt, ...) { + va_list va; + va_start(va, fmt); + Token token = {}; + token.pos = pos; + syntax_error_va(token, fmt, va); + va_end(va); +} + void syntax_warning(Token token, char *fmt, ...) { va_list va; va_start(va, fmt); |