Skip to content

Commit 10e9040

Browse files
blindFSBahex
andcommitted
fix: special syntax of record match pattern
--------- Co-authored-by: Bahex <[email protected]>
1 parent d7dd9a7 commit 10e9040

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

languages/nu.scm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,9 @@
300300
)
301301

302302
(val_record
303-
entry: (record_entry) @append_space
303+
entry: _ @append_space
304304
.
305-
entry: (record_entry) @prepend_spaced_softline
305+
entry: _ @prepend_spaced_softline
306306
)
307307

308308
(record_body

test/expected_ctrl.nu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ match $foo {
2424
match $foo {
2525
[a b c] => 0
2626
a | b | c => 42
27+
{$bar $baz} => $baz
2728
}
2829
match $foo { null => { return "default" } $val => $val }
2930
# while

test/input_ctrl.nu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ match $foo {
2424
match $foo {
2525
[ a b c] => 0
2626
a|b|c => 42
27+
{ $bar $baz} => $baz
2728
}
2829
match $foo {null => {return "default"} $val => $val}
2930
# while

0 commit comments

Comments
 (0)