-
Notifications
You must be signed in to change notification settings - Fork 591
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
[JavaScript] Meta Numbers #2463
Conversation
This commit replaces the `punctuation.definition.numeric` and `storage.type.numeric` by `meta.number.[base|type]` scope.
Instead of using `mantissa` for integers, the more general `value` is used. The scope scheme was updated to: meta number sign base value mantissa exponent type unit
This commit moves the capture group of the `dec_exponent` from the variable definition to the match rule in order to give PackageDev a chance to highlight all capture groups of the match correctly.
1. Removes `mantissa` and `exponent` sub scopes. 2. Renames `type` to `suffix`
Applies `meta.number.<type> constant.numeric.[base|value|suffix]`
Looks like there are some test failures also |
I somehow need a way to run all test cases locally on my windows machine. It's not the first time I miss to update some test files. |
You don't use the build variant to run all tests? |
It does just freeze ST but nothing else. I therefore even removed it from command palette, because I got sick of killing ST when hitting it by accident. It is meant to run all syntax test files it finds? My impression was it just tries to run all syntaxes against the single file or something like that. |
* [JavaScript] Add meta.number This commit replaces the `punctuation.definition.numeric` and `storage.type.numeric` by `meta.number.[base|type]` scope. * [JavaScript] Add meta.number.value Instead of using `mantissa` for integers, the more general `value` is used. The scope scheme was updated to: meta number sign base value mantissa exponent type unit * [JavaScript] Move float exponent capture groups This commit moves the capture group of the `dec_exponent` from the variable definition to the match rule in order to give PackageDev a chance to highlight all capture groups of the match correctly. * [JavaScript] Simplify meta.number scopes 1. Removes `mantissa` and `exponent` sub scopes. 2. Renames `type` to `suffix` * [JavaScript] Update meta.number scopes Applies `meta.number.<type> constant.numeric.[base|value|suffix]` * [JavaScript] Move meta.number to common scope directive * [JavaScript] Update test cases
This PR is a proposal created from the latest discussion at #2460
It is to illustrate what it means to add meta.number scopes. It means to add one or up to 1 (2) additional capture groups per match pattern to assign meta.numbers.[base|value|suffix]. The complexity is the same for applying meta.numbers on top of below constant.numeric.
Note: It also contains the older more complex solutions for comparison.