Skip to content

Commit 48a2b51

Browse files
committed
Update GDScript parser, add test for comments in dictionary
Close #122
1 parent 9792664 commit 48a2b51

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

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.0", features = ["derive", "wrap_help"] }
1515
topiary-core = { git = "https://github.com/tweag/topiary", rev = "5081ccef9245fe56c2b3e2a7ced52277eda45825" }
16-
tree-sitter-gdscript = { git = "https://github.com/PrestonKnopp/tree-sitter-gdscript.git", rev = "839cd921c8aa8b79c9afe2eb71a6a7bfa809e995" }
16+
tree-sitter-gdscript = { git = "https://github.com/PrestonKnopp/tree-sitter-gdscript.git", rev = "faf0de3f715a62f2c2716c86904a3f3e11c63ed8" }
1717
regex = "1.11"
1818
tree-sitter = "0.25.10"
1919
rayon = "1.11.0"

tests/expected/dictionaries.gd

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,11 @@ var my_dictionary_2 = {
1111
}
1212

1313
var dict: Dictionary[int, int] = { }
14+
15+
const EXCEPTIONS: Dictionary[String, Dictionary] = {
16+
# UI scene
17+
"UI": {
18+
# Required to allow typing in the console
19+
"ConsoleInput": Control.FOCUS_ALL,
20+
},
21+
}

tests/input/dictionaries.gd

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,11 @@ var my_dictionary_2 = {
1010
key = "value"}
1111

1212
var dict: Dictionary[int,int] = {}
13+
14+
const EXCEPTIONS: Dictionary[String, Dictionary] = {
15+
# UI scene
16+
"UI": {
17+
# Required to allow typing in the console
18+
"ConsoleInput": Control.FOCUS_ALL,
19+
},
20+
}

0 commit comments

Comments
 (0)