Repository navigation
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
advance_cmdsub counted parens, so the `)` of a case pattern closed a $(...) that
sits inside a double-quoted word. The scan went on with the word's quote out of
step, and a valid command was refused:
x="$(case a in a) echo "q'r";; esac)" # bash: q'r
# hellish: syntax error
span_skip already walks these spans through casescan, the automaton #95 added for
the same `)`, so advance_cmdsub delegates to it and a second walker goes.
Stacked on fix/nested-cmdsub-quote: a case nested in a case needs that half too.
Five cases join tests/issue95_case_cmdsub.
Closes #191
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LESdylan
force-pushed
the
fix/nested-cmdsub-quote
branch
from
November 4, 2026 14:45
f51018e to
28203eb
Compare
LESdylan
force-pushed
the
fix/lexer-cmdsub-case
branch
from
November 4, 2026 14:45
111fcf5 to
acaa05f
Compare
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #191
Stacked on the nested-quote fix: a
casenested in acaseneeds both halves. This targets that branch so the diff stays one concern, and GitHub moves it todevelopwhen the first one merges.Problem
advance_cmdsubcounted parens, so inx="$(case a in a) echo "q'r";; esac)"the pattern's)closed the substitution and a valid command was a syntax error.Fix
advance_cmdsubdelegates tospan_skip, which handles this throughcasescan(#95). The lexer and the expander no longer hold two walkers that can disagree.Tests
tests/issue95_case_cmdsub.make testagainst the pinned bash 5.3.9: 5386/5386.make alldebug build (-Werror): no warnings.🤖 Generated with Claude Code