1
0
dust/tree-sitter-dust/corpus/lists.txt

144 lines
2.5 KiB
Plaintext
Raw Normal View History

==================
List Declaration
==================
['answer', 42]
---
(root
(item
(statement
(expression
(value
(list
(expression
(value
(string)))
(expression
(value
(integer)))))))))
==================
List Assignment
==================
2023-10-23 20:12:43 +00:00
empty = []
foobar = ['foobar']
---
(root
2023-10-23 20:12:43 +00:00
(item
(statement
(assignment
(identifier)
(assignment_operator)
(statement
(expression
(value
(list)))))))
(item
(statement
(assignment
(identifier)
(assignment_operator)
(statement
(expression
(value
(list
(expression
(value
(string)))))))))))
==================
List Nesting
==================
['answers', [42, [666]]]
---
(root
(item
(statement
(expression
(value
(list
(expression
(value
(string)))
(expression
(value
(list
(expression
(value
(integer)))
(expression
(value
(list
(expression
(value
(integer)))))))))))))))
2023-10-28 14:28:43 +00:00
2023-10-29 23:31:06 +00:00
==================
List Index
==================
['answers', 42, 666].{1}
---
(root
(item
(statement
(expression
(index
(expression
(value
(list
(expression
(value
(string)))
(expression
(value
(integer)))
(expression
(value
(integer))))))
(expression
(value
(integer))))))))
2023-10-28 14:28:43 +00:00
==================
Sublist
==================
2023-10-29 23:31:06 +00:00
['answers', 42, 666].{1..2}
2023-10-28 14:28:43 +00:00
---
(root
(item
(statement
(expression
2023-10-29 23:31:06 +00:00
(index
2023-10-28 14:28:43 +00:00
(expression
(value
(list
(expression
(value
(string)))
(expression
(value
(integer)))
(expression
(value
(integer))))))
(expression
(value
(integer)))
(expression
(value
2023-10-29 23:31:06 +00:00
(integer))))))))