new syntax to get items from collection: collection[index]. Supported collections are string, list and dict
This commit is contained in:
+3
-3
@@ -83,12 +83,12 @@ func (list *ListType) indexDeepCmp(target any) (index int) {
|
||||
|
||||
// -------- list term
|
||||
func newListTermA(args ...*term) *term {
|
||||
return newListTerm(args)
|
||||
return newListTerm(0, 0, args)
|
||||
}
|
||||
|
||||
func newListTerm(args []*term) *term {
|
||||
func newListTerm(row, col int, args []*term) *term {
|
||||
return &term{
|
||||
tk: *NewValueToken(0, 0, SymList, "[]", args),
|
||||
tk: *NewValueToken(row, col, SymList, "[]", args),
|
||||
parent: nil,
|
||||
children: nil,
|
||||
position: posLeaf,
|
||||
|
||||
Reference in New Issue
Block a user