mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-26 02:51:16 -03:00
Rationalize how the parser reports tokenizer errors
Remove the unnecessary SQUASH_ERROR flag and correctly report errors generated from the tokenizer.
This commit is contained in:
@@ -2316,7 +2316,7 @@ static wchar_t unescaped_quote(const wcstring &str, size_t pos) {
|
||||
|
||||
/// Returns true if the last token is a comment.
|
||||
static bool text_ends_in_comment(const wcstring &text) {
|
||||
tokenizer_t tok(text.c_str(), TOK_ACCEPT_UNFINISHED | TOK_SHOW_COMMENTS | TOK_SQUASH_ERRORS);
|
||||
tokenizer_t tok(text.c_str(), TOK_ACCEPT_UNFINISHED | TOK_SHOW_COMMENTS);
|
||||
tok_t token;
|
||||
while (tok.next(&token)) {
|
||||
; // pass
|
||||
|
||||
Reference in New Issue
Block a user