Minor simplification in tokenizer

This commit is contained in:
Johannes Altmanninger 2024-04-27 17:35:08 +02:00
parent dfd08a1a2c
commit 861feb7b46

View File

@ -603,7 +603,7 @@ impl Tokenizer {
1,
);
}
if paran_offsets.is_empty() {
if paran_offsets.pop().is_none() {
return self.call_error(
TokenizerError::closing_unopened_subshell,
self.token_cursor,
@ -612,7 +612,6 @@ impl Tokenizer {
1,
);
}
paran_offsets.pop();
if paran_offsets.is_empty() {
mode &= !TOK_MODE_SUBSHELL;
}