I have the following sample code which includes a parse error:
extends Control
# Error at (4, 6): Expected end of statement after variable declaration, found "{" instead.
var a: { "foo": "bar" } # Should be `a = {}`
# Ready function
func _ready() -> void:
var prefix: String = "Value: "
var count := 10
for i in range(count):
print(prefix, i)
Running the formatter gives the following result, unindenting all functions within the file:
extends Control
# Error at (4, 6): Expected end of statement after variable declaration, found "{" instead.
var a: { "foo": "bar" } # Should be `a = {}`
# Ready function
func _ready() -> void:
var prefix: String = "Value: "
var count := 10
for i in range(count):
print(prefix, i)
Formatter should probably not be able to run on a script containing parse errors to prevent this. Likely difficult to verify without godot running so this might be tricky.
I have the following sample code which includes a parse error:
Running the formatter gives the following result, unindenting all functions within the file:
Formatter should probably not be able to run on a script containing parse errors to prevent this. Likely difficult to verify without godot running so this might be tricky.