Unify argument parsing. Fix #24.

This commit is contained in:
Bob Nystrom
2015-02-22 10:42:49 -08:00
parent a8a5805895
commit 0f9e15833f
2 changed files with 47 additions and 27 deletions
+20
View File
@@ -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