Unify argument parsing. Fix #24.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
class Foo {
|
||||
method(a, b) { "method " + a + " " + b }
|
||||
[a, b] { "subscript " + a + " " + b }
|
||||
}
|
||||
|
||||
var foo = new Foo
|
||||
|
||||
// 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
|
||||
Reference in New Issue
Block a user