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 number literals in the Ruby lexer #1456

Merged
merged 2 commits into from
Mar 8, 2020

Conversation

gfx
Copy link
Member

@gfx gfx commented Mar 7, 2020

Fix a problem that the following number literals are not tokenized properly:

  • 1e23
  • 1_2.3_4

I think we'd better add the common utility for such common-but-complex tokens.

Copy link
Contributor

@pyrmont pyrmont left a comment

Choose a reason for hiding this comment

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

This looks good to me. Anything else you wanted to add?

@pyrmont pyrmont self-assigned this Mar 8, 2020
@pyrmont pyrmont added the author-action The PR has been reviewed but action by the author is needed label Mar 8, 2020
@gfx
Copy link
Member Author

gfx commented Mar 8, 2020

That's all for the time being. Thanks!

@pyrmont pyrmont merged commit 58d57a4 into master Mar 8, 2020
@pyrmont pyrmont removed the author-action The PR has been reviewed but action by the author is needed label Mar 8, 2020
@gfx gfx deleted the fix_number_literals_for_ruby_lexer branch March 10, 2020 00:43
mattt pushed a commit to NSHipster/rouge that referenced this pull request May 21, 2020
Ruby supports number literals that include `_` and that include
exponents. This commit adds support for this syntax to the Ruby lexer.
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