You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
To pick up a draggable item, press the space bar.
While dragging, use the arrow keys to move the item.
Press space again to drop the item in its new position, or press escape to cancel.
To pick up a draggable item, press the space bar.
While dragging, use the arrow keys to move the item.
Press space again to drop the item in its new position, or press escape to cancel.
Description
If the class name starts with underscore, the tokenizing of the whole line of variable definition breaks.
_BaseActionController gets treated equally like BaseActionController.
Actual behavior: [What actually happens]
The whole line is not tokenized.
Reproduces how often: [What percentage of the time does it reproduce?]
Versions
You can get this information from copy and pasting the output of atom --version and apm --version from the command line. Also, please include the OS and what version of the OS you're running.
Additional Information
Any additional information, configuration or data that might be necessary to reproduce the issue.
Same happens if the class name starts with a lower case character. And the behavior differs a little bit depending on whether the class is fully consisted of lower case characters.
changed the title [-]Variable definition error with class name starting with underscore[/-][+]Variable definition error with class name starting with underscore or lowercase letter[/+]on Jun 27, 2019
@rsese this issue does not exist tree-sitter, along with other stuff like generics, variables, multiline methods, etc. that we struggle to fix properly with regex.
I already use experimental tree-sitter when working with Java; and I am trying to merge my PR as soon as possible to get that into Atom release.
Thanks for letting me know!
We can still patch this in TextMate grammar. I will take a look this weekend if it is okay (a bit snowed under with some other stuff at work), or can do tonight, if it is urgent. Let me know!
Text-mate is where the original syntax highlighting for Atom (and sublime, and I believe VS Code) comes from. It's a whole bunch of regexes with some smarts layered on top so they can do more than a single regex could.
Activity
felixhao28 commentedon Nov 23, 2018
Same happens if the class name starts with a lower case character. And the behavior differs a little bit depending on whether the class is fully consisted of lower case characters.
sadikovi commentedon Nov 23, 2018
That is interesting. We might need to extend pattern to handle these characters. Thanks! I will have a look.
rsese commentedon Jun 27, 2019
This was mentioned on the message board recently:
https://discuss.atom.io/t/java-syntax-highlighting-for-lowercase-object-variable-names/66322
Their example:
And screenshot:
(See
someObjectType
).[-]Variable definition error with class name starting with underscore[/-][+]Variable definition error with class name starting with underscore or lowercase letter[/+]sadikovi commentedon Jun 27, 2019
@rsese this issue does not exist tree-sitter, along with other stuff like generics, variables, multiline methods, etc. that we struggle to fix properly with regex.
I already use experimental tree-sitter when working with Java; and I am trying to merge my PR as soon as possible to get that into Atom release.
Thanks for letting me know!
We can still patch this in TextMate grammar. I will take a look this weekend if it is okay (a bit snowed under with some other stuff at work), or can do tonight, if it is urgent. Let me know!
felixhao28 commentedon Jun 27, 2019
What is tree-sitter?
calebmeyer commentedon Jun 27, 2019
Text-mate is where the original syntax highlighting for Atom (and sublime, and I believe VS Code) comes from. It's a whole bunch of regexes with some smarts layered on top so they can do more than a single regex could.
Tree sitter is a new parser generator tool that creates much more correct (and often faster!) parsers using syntax trees: http://tree-sitter.github.io/tree-sitter/
mckinleyrebecca commentedon Jun 27, 2019
@sadikovi I made the post on the message board about the lowercase object types. This issue is not urgent, but thank you for looking into it!