File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed
Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 212212
213213; This is for ternary expressions, e.g. `a if b else c`
214214(conditional_expression [("if") ("else")] @prepend_space @append_space )
215+ (parenthesized_expression (conditional_expression ("if") @prepend_input_softline ))
215216(parenthesized_expression (conditional_expression ("else") @prepend_input_softline ))
217+ (conditional_expression (conditional_expression ("if") @prepend_input_softline ))
216218(conditional_expression (conditional_expression ("else") @prepend_input_softline ))
217219
218220(parenthesized_expression "(" @append_antispace )
Original file line number Diff line number Diff line change @@ -7,6 +7,16 @@ func foo():
77 else "northwest"
88 )
99
10+ var quadrant_newlines = (
11+ "northeast"
12+ if angle_degrees <= 90
13+ else "southeast"
14+ if angle_degrees <= 180
15+ else "southwest"
16+ if angle_degrees <= 270
17+ else "northwest"
18+ )
19+
1020 var position = Vector2 (250 , 350 )
1121 if (
1222 position .x > 200 and position .x < 400
Original file line number Diff line number Diff line change @@ -8,6 +8,18 @@ func foo():
88 else "northwest"
99 )
1010
11+ var quadrant_newlines = (
12+ "northeast"
13+ if angle_degrees <= 90
14+ else "southeast"
15+
16+ if angle_degrees <= 180
17+ else "southwest"
18+
19+ if angle_degrees <= 270
20+ else "northwest"
21+ )
22+
1123 var position = Vector2 (250 , 350 )
1224 if (
1325 position .x > 200 and position .x < 400
You can’t perform that action at this time.
0 commit comments