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 underscore in Int literals. #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

davidhesselbom
Copy link
Contributor

@fredrikbryntesson, can you take a look at this?

@@ -445,7 +445,7 @@
'name': 'constant.numeric.float.ooc'
}
{
'match': '(?x)\\b([0-9]+)(?: [eE][+\\-]?\\d+)?'
'match': '(?x)\\b(([0-9]+_?[0-9]+)+)(?: [eE][+\\-]?\\d+)?'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there a way to simplify this? What I'm trying to achieve here is that _ should be allowed between digits, but not at the start or the end of an Int literal, i.e. 123_456_789 is correct, but _123 or 123_ isn't.

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