Added scopes for many kernel and special methods in tree-sitter parser.
For example:
visibility methods (private, protected ...)
new method
Gemfile-specific methods
lambda notation (->(a) { })
attr_accessors
some predefined constants (ENV, __FILE__)
Alternate Designs
None.
Benefits
More accurate highlighting.
Possible Drawbacks
None.
Applicable Issues
252
Disclaimer
I didn't understand how to "extend" grammars to make Gemfile's grammar separate and just extend ruby grammar with some specials. Is it possible?
I haven't found any explicit information about available scopes and logic for mapping them to each language-specific situation. So I've done my best effort.
Description of the Change
Added scopes for many kernel and special methods in tree-sitter parser. For example:
private
,protected
...)new
method->(a) { }
)ENV
,__FILE__
)Alternate Designs
None.
Benefits
More accurate highlighting.
Possible Drawbacks
None.
Applicable Issues
252
Disclaimer