Skip to content

Commit 52eb8a6

Browse files
authored
Merge pull request #50 from fstxz/typed-dict-comma
Ensure space after comma between element types in typed dictionaries
2 parents cb446ce + 1e4f5a0 commit 52eb8a6

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

queries/gdscript.scm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
(typed_parameter ":" @append_space)
2222
(typed_default_parameter ":" @append_space)
2323
(variable_statement ":" @append_space)
24+
(subscript_arguments "," @append_space)
2425

2526
; ARRAY AND DICTIONARY
2627
; If the array is on a single line, only insert spaces between values. If it's

tests/expected/dictionaries.gd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ var my_dictionary = { key = "value" }
99
var my_dictionary_2 = {
1010
key = "value",
1111
}
12+
13+
var dict: Dictionary[int, int] = { }

tests/input/dictionaries.gd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ var my_dictionary = {key = "value"}
88
# But only if it fits on one line
99
var my_dictionary_2 = {
1010
key = "value"}
11+
12+
var dict: Dictionary[int,int] = {}

0 commit comments

Comments
 (0)