Scony / godot-gdscript-toolkit

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

gdradon: Can't use cc with files with getters and setters #311

Open pmiller3 opened 2 months ago

pmiller3 commented 2 months ago

I'm trying to use a file, for example gdradon_error.gd with the command gdradon cc gdradon_error.gd, but I get an error:

Cannot process file 'gdradon_error.gd' due to exception: Token('RULE', 'property_body_def')

This happens to me with any file with a getter or setter on a property, such as:

extends Node

var can: int
var cant: int:
    get:
        return cant
var wont: int:
    set(value):
        wont = value

func _ready():
    can = 1
    cant = 0
    wont = 0