Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RubyParser: basic support for regex literals #2778

Merged
merged 4 commits into from
May 30, 2023

Conversation

xavierpinho
Copy link
Contributor

  • Supports (potentially interpolated) regex literals in the parser
  • RubyParser.g4: renamed interpolation as interpolatedStringSequence, to avoid any confusion with regex literals' own interpolation sub-production (now named interpolatedRegexSequence)
  • RubyLexerBase: refactored the predicate for deciding when to start a regex literal by using "sentinel" tokens more explicitly. This approach will need to be reconsidered, as it can't be exhaustive. But fortunately this is contained exclusively in RubyLexer

@xavierpinho xavierpinho merged commit e33828e into master May 30, 2023
@xavierpinho xavierpinho deleted the xavierp/rubyparser-regex-literals branch May 30, 2023 12:32
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.

2 participants