Correctly report the range of tokenizer errors

This enables proper syntax highlighting of tokenizer errors.
This commit is contained in:
ridiculousfish
2019-10-27 15:44:08 -07:00
parent 0bfd897ee0
commit afd20b8e1a
4 changed files with 19 additions and 13 deletions

View File

@@ -108,7 +108,7 @@ class tokenizer_t {
bool continue_line_after_comment{false};
tok_t call_error(tokenizer_error_t error_type, const wchar_t *token_start,
const wchar_t *error_loc);
const wchar_t *error_loc, maybe_t<size_t> token_length = {});
tok_t read_string();
public: