mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-11 05:31:14 -03:00
Remove preceding_escaped_nl
It's no longer necessary for fish_indent
This commit is contained in:
@@ -498,12 +498,10 @@ maybe_t<tok_t> tokenizer_t::next() {
|
||||
|
||||
// Consume non-newline whitespace. If we get an escaped newline, mark it and continue past
|
||||
// it.
|
||||
bool preceding_escaped_nl = false;
|
||||
for (;;) {
|
||||
if (this->token_cursor[0] == L'\\' && this->token_cursor[1] == L'\n') {
|
||||
this->token_cursor += 2;
|
||||
this->continue_line_after_comment = true;
|
||||
preceding_escaped_nl = true;
|
||||
} else if (iswspace_not_nl(this->token_cursor[0])) {
|
||||
this->token_cursor++;
|
||||
} else {
|
||||
@@ -527,7 +525,6 @@ maybe_t<tok_t> tokenizer_t::next() {
|
||||
tok_t result(token_type_t::comment);
|
||||
result.offset = comment_start - this->start;
|
||||
result.length = comment_len;
|
||||
result.preceding_escaped_nl = preceding_escaped_nl;
|
||||
return result;
|
||||
}
|
||||
while (iswspace_not_nl(this->token_cursor[0])) this->token_cursor++;
|
||||
@@ -651,7 +648,6 @@ maybe_t<tok_t> tokenizer_t::next() {
|
||||
}
|
||||
}
|
||||
assert(result.has_value() && "Should have a token");
|
||||
result->preceding_escaped_nl = preceding_escaped_nl;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user