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

Fix single line block comments and scoped variables and functions in JSL lexer #1663

Merged
merged 5 commits into from Jan 27, 2021

Conversation

BenPH
Copy link
Contributor

@BenPH BenPH commented Dec 29, 2020

This PR has the following fixes for the JSL lexer:

  • Single line block comments no longer comment out the rest of the file
  • Scoped variables/functions get lexed correctly e.g. namespace:my_var

Copy link
Collaborator

@dblessing dblessing left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution @BenPH. I left a few comments for your consideration.

lib/rouge/lexers/jsl.rb Outdated Show resolved Hide resolved
lib/rouge/lexers/jsl.rb Show resolved Hide resolved
lib/rouge/lexers/jsl.rb Show resolved Hide resolved
@dblessing dblessing added the author-action The PR has been reviewed but action by the author is needed label Jan 19, 2021
@BenPH
Copy link
Contributor Author

BenPH commented Jan 20, 2021

Thanks for your comments @dblessing. I've added some changes.

@dblessing
Copy link
Collaborator

Seeing no other discussion, I'm merging. Thanks @BenPH

@dblessing dblessing merged commit 88da9c6 into rouge-ruby:master Jan 27, 2021
mattt pushed a commit to NSHipster/rouge that referenced this pull request May 19, 2021
…JSL lexer (rouge-ruby#1663)

* fix lexing of one line block comments

* better parsing of scoped variables/functions

* missing return

* add more jsl visual samples

* simplify multiline comment rule
use non greedy .*

Co-authored-by: Ben Peachey Higdon <bpeachey@predictum.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author-action The PR has been reviewed but action by the author is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants