1
0
dust/tree-sitter-dust/corpus/tables.txt
2023-10-22 14:29:07 -04:00

121 lines
2.3 KiB
Plaintext

==================
Table Declaration
==================
table <text, number> [
['answer', 42]
]
---
(root
(item
(statement
(expression
(value
(table
(identifier)
(identifier)
(expression
(value
(list
(expression
(value
(list
(expression
(value
(string)))
(expression
(value
(integer)))))))))))))))
==================
Table Assignment
==================
foobar = table <text, number> [
['answer', 42]
]
---
(root
(item
(statement
(assignment
(identifier)
(assignment_operator)
(statement
(expression
(value
(table
(identifier)
(identifier)
(expression
(value
(list
(expression
(value
(list
(expression
(value
(string)))
(expression
(value
(integer)))))))))))))))))
==================
Table Access
==================
select <number> from foobar {
text == 'answer'
}
---
(root
(item
(statement
(select
(identifier)
(expression
(identifier))
(item
(statement
(expression
(logic
(expression
(identifier))
(logic_operator)
(expression
(value
(string)))))))))))
==================
Table Insert
==================
insert into foobar [
['bob was here', 0]
]
---
(root
(item
(statement
(insert
(identifier)
(expression
(value
(list
(expression
(value
(list
(expression
(value
(string)))
(expression
(value
(integer)))))))))))))