Skip to content

Commit b85ae6a

Browse files
committed
Update GDScript parser, fix 4 issues
This commit updates the parser, which addresses 4 parsing issues: - In Lua-style dicts, string keys were not supported (e.g. { "key" = value }). Added support for it - Annotated signals errored out in inner classes. E.g. @warning_ignore() signal exited - Inline if in lambdas like func(): if condition: ... caused an error - @tool extends Node on one line was not supported. the annotation was parsed standalone and extends errored out This addresses these 4 tickets in the formatter: Close GDQuest#209: Missing space between extends and class_name GDQuest#209 Close GDQuest#201: if statements inside of lambdas are broken after formatting. GDQuest#201 Close GDQuest#136: Nested dictionaries using = for key value pairs are missing a space in some cases GDQuest#136 Close GDQuest#195: nnotation in inner class fails to parse causing broken formatting GDQuest#195
1 parent 47e4630 commit b85ae6a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ default-run = "gdscript-formatter"
1313
[dependencies]
1414
clap = { version = "=4.6.0", features = ["derive", "wrap_help"] }
1515
topiary-core = "=0.7.3"
16-
tree-sitter-gdscript = { git = "https://github.com/PrestonKnopp/tree-sitter-gdscript.git", rev = "89e66b6bdc002ab976283f277cbb48b780c5d0e9" }
16+
tree-sitter-gdscript = { git = "https://github.com/GDQuest/tree-sitter-gdscript.git", rev = "d7cf0d60cabcd69688471891076508a4c606270f" }
1717
regex = "=1.12.3"
1818
tree-sitter = "=0.26.8"
1919
rayon = "=1.11.0"

0 commit comments

Comments
 (0)