-
Notifications
You must be signed in to change notification settings - Fork 588
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
[ActionScript] refactor syntax #3558
base: master
Are you sure you want to change the base?
Conversation
- update to syntax v2 - add variables - move comments to prototype context - add named contexts for strings and comments
To anybody reviewing, you can check I haven't changed the regex for the variables by reversing my changes:
|
- match: \b(?:{{keywords}})\b | ||
scope: keyword.control.actionscript |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about a dedicated keywords
context to apply more detailed scopes such as keyword.control.conditional
or keyword.control.loop
... just to get those inline with other syntaxes?
- match: |- | ||
(?x: | ||
(\d+\.?\d*|\.\d+) | ||
({{constant_numeric_exponent}})? | ||
(L|l|UL|ul|u|U|F|f)? | ||
) | ||
scope: meta.number.actionscript | ||
captures: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to try to distinguish floats from integers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess, will take another look.
- match: |- | ||
(?x: | ||
(\d+\.?\d*|\.\d+) | ||
({{constant_numeric_exponent}})? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exponent is used once only. Is it really worth a variable then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A leftover from halfway through the re-write as I wasn't sure if I'd need it again maybe. Might keep it when distinguishing floats and integers.
Co-authored-by: deathaxe <[email protected]>
Co-authored-by: deathaxe <[email protected]>
Co-authored-by: deathaxe <[email protected]>
Co-authored-by: deathaxe <[email protected]>
I'll address leftover comments later today. |
Co-authored-by: deathaxe <[email protected]>
Co-authored-by: deathaxe <[email protected]>
Co-authored-by: deathaxe <[email protected]>
Co-authored-by: deathaxe <[email protected]>
Co-authored-by: deathaxe <[email protected]>
I still have to do the |
meta_scope
captures: 0: ...
withscope: ...