Repository navigation
fix(parser): backslash escapes after a quoted segment - #2550
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | d1d5499 | Commit Preview URL Branch Preview URL |
Oct 07 2026, 07:44 AM |
`'a'\''b'` failed with "unterminated single quote", and `"a"\$x`, `'a'\ b`, `"g"\*` kept the backslash. The quote-continuation reader now treats `\c` as a quoted `c` and backslash-newline as a continuation. Claude-Session: https://claude.ai/code/session_019aFikmptPc91Fj4N2iDXQA
chaliy
force-pushed
the
claude/fidelity-quote-escape
branch
from
October 7, 2026 07:43
6574b4b to
d1d5499
Compare
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.
Requested by Михайло · project thread
What changed
The lexer now handles a backslash escape that directly follows a quoted segment inside the same word (
'a'\''b',"x"\$y). The escaped char is kept literal and marked quoted;\<newline>is still a line continuation.Why
'a'\''b'is the standard way to put a single quote inside a single-quoted string, and nestedsh -c '...'\''...'\''...'scripts depend on it. Bashkit rejected it as an unterminated quote.Before
After
Matches bash 5.2 on the three new spec cases in
quote.test.sh.Risk
Low. Lexer-only change in one continuation path; full lib (2992) and integration (1502) suites pass. Known remaining gap logged in knowledge:
${x:-'d'}unquoted keeps the single quotes.Checklist
cargo fmt,cargo clippy -D warningshttps://claude.ai/code/session_019aFikmptPc91Fj4N2iDXQA
Generated by Claude Code