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

106 lines
2.7 KiB
Plaintext
Raw Normal View History

2023-11-11 01:44:03 +00:00
================================================================================
Table Declaration
2023-11-11 01:44:03 +00:00
================================================================================
2023-10-31 22:18:39 +00:00
table |messages numbers| [
2023-10-31 20:25:13 +00:00
['hiya' 42]
['foo' 57]
['bar' 99.99]
2023-10-18 23:26:49 +00:00
]
2023-11-11 01:44:03 +00:00
--------------------------------------------------------------------------------
(root
2023-11-11 01:44:03 +00:00
(statement
(expression
(value
(table
(identifier_list
(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))))))))))))))
2023-10-31 13:31:10 +00:00
2023-11-11 01:44:03 +00:00
================================================================================
Table Access
2023-11-11 01:44:03 +00:00
================================================================================
2023-10-31 22:18:39 +00:00
select |number| from foobar {
2023-10-21 17:04:17 +00:00
text == 'answer'
}
2023-11-11 01:44:03 +00:00
--------------------------------------------------------------------------------
(root
2023-11-11 01:44:03 +00:00
(statement
(select
(identifier_list
(identifier))
(expression
(identifier))
(block
(statement
(expression
(logic
(expression
(identifier))
(logic_operator)
(expression
(value
(string))))))))))
2023-11-11 01:44:03 +00:00
================================================================================
Table Insert
2023-11-11 01:44:03 +00:00
================================================================================
insert into foobar [
['bob was here', 0]
]
2023-11-11 01:44:03 +00:00
--------------------------------------------------------------------------------
(root
2023-11-11 01:44:03 +00:00
(statement
(insert
(identifier)
(expression
(value
(list
(expression
(value
(list
(expression
(value
(string)))
(expression
(value
(integer))))))))))))