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

107 lines
2.2 KiB
Plaintext
Raw Normal View History

==================
Table Declaration
==================
2023-10-28 14:28:43 +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
(statement
(expression
(value
(table
(identifier)
(identifier)
(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
(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)))))))))))))