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

Support multiple states when parsing rules #2078

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

tancnle
Copy link
Collaborator

@tancnle tancnle commented Sep 30, 2024

Prior to this change, we can only push one state per rule. Many lexers need multiple states to work as expected. For example, some languages allow multiline comments to be nested.

For example, if we want to match a comment containing a directive, something like:

/* <processing directive>    rest of comment */

This also allows us to have parity with Pygments support of multiple states .

@tancnle tancnle added this pull request to the merge queue Nov 11, 2024
Merged via the queue into rouge-ruby:master with commit ad96ec4 Nov 11, 2024
8 checks passed
@tancnle tancnle deleted the support-multiple-states branch November 11, 2024 01:03
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