Commit Graph

1 Commits

Author SHA1 Message Date
Bob Nystrom
cc117912fa feat: implement list literal syntax and List class with count property
Add support for list literals in the compiler with bracket-delimited syntax and comma-separated elements. Introduce the ObjList runtime type with a contiguous elements array, garbage collection marking, and proper memory deallocation. Expose a `List` class in the core library with a `count` method returning the number of elements. Update the grammar table to register `[` as a prefix token for list compilation instead of an infix subscript operator, and reorder opcode enum entries to place CODE_LIST before the load/store group.
2013-11-24 21:38:31 +00:00