Uh oh!
There was an error while loading. Please reload this page.
fix: escaped double-quotes in helper string arguments (issue #584) - #621
Merged
Conversation
…ts (issue #584) The LiteralParser's AccumulateLiteral method now correctly processes backslash escape sequences inside delimited string literals, so that \" inside a double-quoted helper argument is treated as a literal quote rather than terminating the string. Adds two regression tests for issue #584. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
rexm
enabled auto-merge
June 20, 2026 12:43
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.



Fixes#584
The expression lexer now correctly handles escaped double-quotes (
\") inside double-quoted string arguments to helpers.Root cause
LiteralParser.AccumulateLiteralhad no escape-sequence handling. When parsing a delimited string literal like"hello \"world\"", it would stop at the first\"because"matched the delimiter check — ignoring the preceding backslash. This left the remainingworld\"in the token stream, causing a null token and ultimately aNullReferenceException.Fix
Added escape-sequence handling at the top of the accumulation loop in
LiteralParser.cs. When a\is seen inside a delimited literal:Tests
Two regression tests added to
IssueTests.cs:Issue584_EscapedDoubleQuoteInHelperStringArgument— verifies\"inside a double-quoted arg is treated as a literal"Issue584_SingleQuoteStringArgStillWorks— ensures single-quoted string args are unaffectedAll 1748 existing tests continue to pass.