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

non-orthodox numbers highlighting #103

Open
vors opened this issue May 26, 2018 · 2 comments
Open

non-orthodox numbers highlighting #103

vors opened this issue May 26, 2018 · 2 comments

Comments

@vors
Copy link
Collaborator

vors commented May 26, 2018

Environment

  • Editor and Version (VS Code, Atom, Sublime): Sublime
  • Your primary theme: Default (Monokai??)

Issue Description

This is all valid numbers in ps

1.21e+3l
1.21E-3d
2.12e3lmb
3.1415e3lgb
3.1415e3lkb

Screenshots

image

Expected Behavior

Consistency (this is current ST grammar)
image

@vors vors changed the title $_ is inconsistent with $a non-orthodox numbers highlighting May 26, 2018
@omniomi
Copy link
Collaborator

omniomi commented May 26, 2018

Looks like I missed some cases when I looked at numeric constants. I'll take another pass.

@msftrncs
Copy link
Contributor

Some more examples,

1Dkb
1.Dkb
1.E12kb
1.1Dkb
1.1E12kb
.1E+12Dkb
1Lkb
1.5Lpb
1.E12Lkb
1.14E12Lkb
.14Ltb
1E12Lkb

I think there are a couple more scenario's included here, such as decimal numbers without a leading digit before the decimal point.

I have these worked out in PR #156, I merged the regex in to 3 primary patterns, integer, hex, and decimal, but did not scope them by their final storage type. I have eliminated the patterns that are not allowed (they haven't implemented binary or allowing underscore separators). I could separate these changes out to a new PR.

image

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

No branches or pull requests

3 participants