Skip to content

Commit b726f6e

Browse files
committed
fix(style): multiple lines for multiple IO types
1 parent c6eab73 commit b726f6e

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

languages/nu.scm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160
) @prepend_space
161161

162162
(returns
163-
type: _ @append_space
163+
type: _ @append_spaced_softline
164164
.
165165
type: _
166166
)

test/expected_decl.nu

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ def "hi there" [where: string]: nothing -> record<foo: table<baz: float>, bar: i
3939
}
4040
}
4141

42+
## multiple input/output types
43+
def foo []: [
44+
int -> int
45+
nothing -> int
46+
] { 1 }
47+
4248
# decl_use
4349
use greetings.nu hello
4450
export use greetings.nu *

test/input_decl.nu

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ def "hi there" [where: string]: nothing -> record<foo: table<baz: float>, bar:
3434
bar: 1}
3535
}
3636

37+
## multiple input/output types
38+
def foo []: [
39+
int -> int, nothing -> int
40+
] { 1 }
41+
3742
# decl_use
3843
use greetings.nu hello
3944
export use greetings.nu *

0 commit comments

Comments
 (0)