Files
wren/test/language/method/newlines.wren
T

21 lines
338 B
Plaintext
Raw Normal View History

2015-02-22 10:42:49 -08:00
class Foo {
method(a, b) { "method " + a + " " + b }
[a, b] { "subscript " + a + " " + b }
}
2015-07-10 09:18:22 -07:00
var foo = Foo.new()
2015-02-22 10:42:49 -08:00
// Allow newlines after commas and before ")".
IO.print(foo.method("a",
"b"
)) // expect: method a b
// Allow newlines after commas and before "]".
IO.print(foo["a",
"b"
]) // expect: subscript a b