|
29 | 29 | "[" @append_empty_softline @append_indent_start |
30 | 30 | "]" @prepend_empty_softline @append_empty_softline @prepend_indent_end) |
31 | 31 | (array "," @append_spaced_softline . (comment)? @do_nothing) |
| 32 | +(array ((_expression) @append_delimiter (#delimiter! ",") . ","? @do_nothing . (comment)? . "]") (#multi_line_only!)) |
32 | 33 |
|
33 | 34 | (dictionary |
34 | 35 | "{" @append_empty_softline @append_indent_start |
35 | 36 | "}" @prepend_empty_softline @append_empty_softline @prepend_indent_end) |
36 | 37 | (dictionary "," @append_spaced_softline . (comment)? @do_nothing) |
37 | 38 | (dictionary "{" @append_space "}" @prepend_space (#single_line_only!)) |
38 | 39 | (pair ":" @append_space) |
| 40 | +(dictionary ((pair (_expression)) @append_delimiter (#delimiter! ",") . ","? @do_nothing . (comment)? . "}") (#multi_line_only!)) |
39 | 41 |
|
40 | 42 | ; FUNCTIONS |
41 | 43 | (function_definition (name) @append_antispace) |
|
57 | 59 | "(" @append_hardline @append_indent_start |
58 | 60 | ")" @prepend_hardline @prepend_indent_end |
59 | 61 | (#multi_line_only!)) |
| 62 | +(arguments ((_expression) @append_delimiter (#delimiter! ",") . ","? @do_nothing . (comment)? . ")") (#multi_line_only!)) |
60 | 63 |
|
61 | 64 | ; MULTI-LINE PARAMETERS (in function definitions) |
62 | 65 | (parameters |
|
66 | 69 | (parameters |
67 | 70 | ([(typed_parameter) (typed_default_parameter) (identifier) (default_parameter)]) @prepend_hardline @prepend_indent_start @append_indent_end |
68 | 71 | (#multi_line_only!)) |
| 72 | +(parameters (([(typed_parameter) (typed_default_parameter) (identifier) (default_parameter)]) @append_delimiter (#delimiter! ",") . ","? @do_nothing . (comment)? . ")") (#multi_line_only!)) |
69 | 73 |
|
70 | 74 | ; CLASS DEFINITIONS |
71 | 75 | (class_definition (body) @prepend_hardline) |
|
84 | 88 | "{" @append_input_softline @append_indent_start |
85 | 89 | "}" @prepend_input_softline @prepend_indent_end) |
86 | 90 | (enumerator_list "," @append_spaced_softline . (comment)? @do_nothing) |
| 91 | +(enumerator_list ((enumerator) @append_delimiter (#delimiter! ",") . ","? @do_nothing . (comment)? . "}") (#multi_line_only!)) |
87 | 92 | (enumerator_list) @prepend_space |
88 | 93 |
|
89 | 94 | ; CONSTRUCTORS |
|
0 commit comments