You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jlox already implements the list primitive type (although it doesn't have literal syntax yet). clox should implement it too to have feature parity.
For its expected usage and API, look at samples/list.lox. The only additional piece of syntax needed is for indexing, which takes the form list[index]. In the jlox implementation we experimented with desugaring to a method call to __setitem__ and it worked quite well. We should document this in the (not yet written) spec for Lox.
The text was updated successfully, but these errors were encountered:
zxul767
changed the title
add list primitive type to clox
add list primitive type to clox
Nov 5, 2022
zxul767
changed the title
add list primitive type to clox
add list primitive type to cloxNov 9, 2022
jlox
already implements thelist
primitive type (although it doesn't have literal syntax yet).clox
should implement it too to have feature parity.For its expected usage and API, look at
samples/list.lox
. The only additional piece of syntax needed is for indexing, which takes the formlist[index]
. In thejlox
implementation we experimented with desugaring to a method call to__setitem__
and it worked quite well. We should document this in the (not yet written) spec for Lox.The text was updated successfully, but these errors were encountered: