Skip to content

Support *" string escape sequence#99

Merged
associate-1 merged 1 commit intomainfrom
fix/string-escape-quote-65
Mar 4, 2026
Merged

Support *" string escape sequence#99
associate-1 merged 1 commit intomainfrom
fix/string-escape-quote-65

Conversation

@associate-1
Copy link
Member

Summary

  • Fix lexer readString() to handle occam's * escape character, so *" inside string literals doesn't prematurely terminate the string
  • The parser's convertOccamStringEscapes() already handled *"" conversion, so only the lexer needed updating

Fixes #65

Test plan

  • TestStringEscapeQuote — lexer correctly reads "He said *"hello*"" as a single string token
  • TestE2E_StringWithEscapedQuote — full pipeline: transpile → compile → run produces He said "hello"
  • Full test suite passes (go test ./...)

🤖 Generated with Claude Code

The lexer's readString() did not handle occam's * escape character,
causing *" inside string literals to prematurely terminate the string.
Added escape tracking to match the pattern already used in
readByteLiteral().

Fixes #65

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@associate-1 associate-1 merged commit 6b4b1bc into main Mar 4, 2026
1 check passed
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.

Support *" string escape sequence

2 participants