mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-21 03:21:16 -03:00
Reword confusing comments about quoted cmdsub tokenization
This commit is contained in:
@@ -214,11 +214,11 @@ tok_t tokenizer_t::read_string() {
|
|||||||
mode &= ~(tok_modes::subshell);
|
mode &= ~(tok_modes::subshell);
|
||||||
}
|
}
|
||||||
expecting.pop_back();
|
expecting.pop_back();
|
||||||
// Check if the ) did complete a quoted command substituion.
|
// Check if the ) completed a quoted command substitution.
|
||||||
if (!quoted_cmdsubs.empty() && quoted_cmdsubs.back() == paran_offsets.size()) {
|
if (!quoted_cmdsubs.empty() && quoted_cmdsubs.back() == paran_offsets.size()) {
|
||||||
quoted_cmdsubs.pop_back();
|
quoted_cmdsubs.pop_back();
|
||||||
// Quoted command substitutions temporarily close double quotes, after ),
|
// The "$(" part of a quoted command substitution closes double quotes. To keep
|
||||||
// we need to act as if there was an invisible double quote.
|
// quotes balanced, act as if there was an invisible double quote after the ")".
|
||||||
if (const wchar_t *error_loc = process_opening_quote(L'"')) {
|
if (const wchar_t *error_loc = process_opening_quote(L'"')) {
|
||||||
if (!this->accept_unfinished) {
|
if (!this->accept_unfinished) {
|
||||||
return this->call_error(tokenizer_error_t::unterminated_quote, buff_start,
|
return this->call_error(tokenizer_error_t::unterminated_quote, buff_start,
|
||||||
|
|||||||
Reference in New Issue
Block a user