Scony / godot-gdscript-toolkit

Independent set of GDScript tools - parser, linter, formatter, and more
MIT License
944 stars 65 forks source link

`gdformat`: Nested unique name % access breaks formatting #302

Closed TranquilMarmot closed 4 months ago

TranquilMarmot commented 4 months ago

I have this line in my code:

@onready var animation_tree: AnimationTree = %Character/%AnimationTree

This causes the formatter to fail with:

mation_tree: AnimationTree = %Character/%AnimationTree
                                        ^

Unexpected token Token('PERCENT', '%') at line 11, column 57.
Expected one of: 
        * NAME
Previous tokens: [Token('SLASH', '/')]

It works fine in-engine, though, so it's definitely something that's supported.