Skip to content

fix: preserve raw-string semantics when unquoting tokens - #490

Open
yuefdev wants to merge 1 commit into
alecthomas:masterfrom
yuefdev:fix/raw-string-unquoting-sol
Open

yuefdev wants to merge 1 commit into
alecthomas:masterfrom
yuefdev:fix/raw-string-unquoting-sol

Conversation

@yuefdev

@yuefdev yuefdev commented Oct 18, 2026

Copy link
Copy Markdown

Use strconv.Unquote for backtick-quoted tokens. Unquote("RawString") currently interprets backslash escapes and retains carriage returns, so it disagrees with Go raw-string unquoting. Interpreted and single-quoted tokens keep their existing path.

Regressions fail before the fix. Tests pass with go test ./... -skip '^TestLexerConformanceGenerated$'; the generated conformance test cannot execute its Bash script on Windows. Gofmt and go vet -structtag=false -composites=false ./... pass; unfiltered vet flags the project's shorthand grammar tags and unkeyed test fixtures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant