Closed Cretezy closed 9 months ago
Opened a PR for most of this support: https://github.com/PrestonKnopp/tree-sitter-gdscript/pull/10
Missing in PR:
@rpc
@PrestonKnopp Maybe we can keep this open as it's not fully resolved, unless you planned on making separate issues for annotations and setters/getters.
Yeah I'll add on to this.
Annotations from what I can tell have the following grammar:
argument_list: "(" (expression ("," expression)* )? ")"
annotation: "@" identifier argument_list?
Is there being no support for GD2 causing highlights to not work ?
As I'm having no highlighting and seems to be support for tool
but im getting errors on the @
.
When i check it says identifier has no highlight group set it's like that for a lot of things but i can see the node named and selecting correctly in TSPlayground.
Yes that is correct. The only support for GD2 is from Cretezys PR (#10). I'll have to set aside some time to work on this this weekend.
Tests are passing, but haven't tested it in an editor yet.
Highlighting is incorrect when just setting get
@A-Lamia, Thanks! Should now be fixed in 02a8990.
Seems to be a highlight issue when a variable is declared right after a lambda:
Okay, lambda parsing appears reliable enough for general use. There's many edge cases so issue reports are very welcome. Main commits for lambda: 1bf83db, 49b138c, dcd1eb0, and a254369.
Also added some other GDScript 2 things such as:
Closing, AFAICT, tree-sitter-gdscript as of v1.9.0 is synced with the latest godot gdscript commit noted in the readme.
New issues are welcomed.
Godot 4 comes with gdscript 2. I've experience some ERROR nodes with the current version.
Specifically:
@export
and co.,@onready
,@tool
,@rpc
, etc) are new in Godot 4 and are not recognizedScene unique nodes (fixed in https://github.com/PrestonKnopp/tree-sitter-gdscript/pull/10%Node
) were introduced in Godot 3.5 and are not recognizedSignals now support types in Godot 4 and are not recognizedfixed in https://github.com/PrestonKnopp/tree-sitter-gdscript/pull/10It's possible there's more, these are just the ones I've found.