List literals.

This commit is contained in:
Bob Nystrom
2013-11-24 13:38:31 -08:00
parent f9b008e283
commit 7a343f2ecf
7 changed files with 156 additions and 18 deletions
+1
View File
@@ -24,3 +24,4 @@ bar.method(1, 2, 3, 4) // expect: bar
// TODO(bob): Private fields.
// TODO(bob): Super (or inner) calls.
// TODO(bob): Grammar for what expressions can follow "is".
// TODO(bob): Prevent extending built-in types.
+7
View File
@@ -0,0 +1,7 @@
io.write([].count) // expect: 0
io.write([1].count) // expect: 1
io.write([1, 2, 3, 4].count) // expect: 4
// TODO(bob): Literal syntax, including newline handling.
// TODO(bob): Unterminated list literal.
// TODO(bob): Subscript operator.