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

Simplify default rule in YANG lexer #1488

Merged
merged 2 commits into from
Apr 9, 2020
Merged

Conversation

gribok
Copy link
Contributor

@gribok gribok commented Apr 7, 2020

Simplify rule to reduce complexity.

Example:
Strings like +abc*iu should be valid names for syntax highlighting.
In old version + and * would be an invalid token and marked as red.

Correct validation will be done through compiler.

@pyrmont pyrmont added the author-action The PR has been reviewed but action by the author is needed label Apr 7, 2020
@pyrmont
Copy link
Contributor

pyrmont commented Apr 7, 2020

@gribok Can you add an example to the visual sample so that we can see the rule working there?

@pyrmont pyrmont self-assigned this Apr 7, 2020
@gribok
Copy link
Contributor Author

gribok commented Apr 8, 2020

@gribok Can you add an example to the visual sample so that we can see the rule working there?

The example would break the compiler check, if someone would copy&paste it.
I added a testcase to validate the example.

@pyrmont pyrmont merged commit 1d41d2d into rouge-ruby:master Apr 9, 2020
@pyrmont
Copy link
Contributor

pyrmont commented Apr 9, 2020

@gribok Thanks for the PR. Got it merged in now 🎉

@pyrmont pyrmont removed the author-action The PR has been reviewed but action by the author is needed label Apr 9, 2020
mattt pushed a commit to NSHipster/rouge that referenced this pull request May 21, 2020
Although strings of the form `+abc*iu` should be tokenised as correct
by the Yang lexer, they currently produce errors. This commit fixes
this problem by reducing the characters excluded by the default rule.
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