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

109 lines
2.3 KiB
Plaintext
Raw Normal View History

==================
Table Declaration
==================
2023-10-31 20:25:13 +00:00
table messages numbers [
['hiya' 42]
['foo' 57]
['bar' 99.99]
2023-10-18 23:26:49 +00:00
]
---
(root
2023-10-31 13:31:10 +00:00
(block
2023-10-31 20:25:13 +00:00
(statement
2023-10-31 13:31:10 +00:00
(expression
(value
(table
2023-10-31 20:25:13 +00:00
(parameter_list
(identifier)
(identifier))
2023-10-31 13:31:10 +00:00
(expression
(value
(list
(expression
(value
(list
(expression
(value
(string)))
(expression
(value
(integer))))))
(expression
(value
(list
(expression
(value
(string)))
(expression
(value
(integer))))))
(expression
(value
(list
(expression
(value
(string)))
(expression
(value
(float)))))))))))))))
==================
Table Access
==================
2023-10-21 17:04:17 +00:00
select <number> from foobar {
text == 'answer'
}
---
(root
2023-10-31 13:31:10 +00:00
(block
(statement
(select
2023-10-31 20:25:13 +00:00
(parameter_list
(identifier))
2023-10-31 09:51:37 +00:00
(expression
2023-10-31 13:31:10 +00:00
(identifier))
(block
(statement
2023-10-31 09:51:37 +00:00
(expression
2023-10-31 13:31:10 +00:00
(logic
(expression
(identifier))
(logic_operator)
(expression
(value
(string)))))))))))
==================
Table Insert
==================
insert into foobar [
['bob was here', 0]
]
---
(root
2023-10-31 13:31:10 +00:00
(block
(statement
(insert
(identifier)
(expression
(value
(list
(expression
(value
(list
(expression
(value
(string)))
(expression
(value
(integer)))))))))))))