Skip to content

Conversation

@Jisu-Woniu
Copy link

@Jisu-Woniu Jisu-Woniu commented Apr 29, 2025

Closes #2102

@Jisu-Woniu Jisu-Woniu changed the title Master rust: Add support for string continuation escape Apr 29, 2025
@Jisu-Woniu Jisu-Woniu marked this pull request as ready for review April 29, 2025 09:12
@Jisu-Woniu
Copy link
Author

I am not familliar with Ruby, please correct me if I made any mistake.

@Jisu-Woniu
Copy link
Author

Can someone review this PR,please?

state :string do
rule %r/"/, Str, :pop!
rule escapes, Str::Escape
rule %r/\\\n[ \t\r\n]*/, Str::Escape
Copy link
Collaborator

@tancnle tancnle Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Would this be sufficient? Point of reference, pygments uses the same logic but they use Str token instead.

Suggested change
rule %r/\\\n[ \t\r\n]*/, Str::Escape
rule %r/\\/, Str::Escape

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.

Rust lexer does not support string continuation escapes

2 participants