Scony / godot-gdscript-toolkit

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

Exception thrown when parsing Lambda functions #268

Closed Skyway666 closed 7 months ago

Skyway666 commented 7 months ago

Issue

Both the linter and parser tools correcly function when parsing one line Lambda functions. However, if the Lambda function is defined in multiple lines, an exception is thrown and the files remain unmodified.

image

Steps to reproduce

Run gdlint or gdformat on the "lambda_function_test.gd" script, found in the attached sample project.

Attatchments

The mentioned sample project "gdscript_toolkit_bug_lambda_functions" along with a .txt containing the error code given when attempting the mentioned steps to reproduce are compressed in the following .zip:

gdscript_toolkit_bug_lambda_functions.zip

Scony commented 7 months ago

Duplicate of https://github.com/Scony/godot-gdscript-toolkit/issues/191