2023-09-29 18:32:18 +00:00
|
|
|
==================
|
2023-09-29 20:34:20 +00:00
|
|
|
Table Declaration
|
2023-09-29 18:32:18 +00:00
|
|
|
==================
|
|
|
|
|
|
|
|
table <text, number> {
|
2023-09-29 20:34:20 +00:00
|
|
|
['answer', 42]
|
2023-09-29 18:32:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
(root
|
|
|
|
(item
|
|
|
|
(statement
|
2023-10-01 04:01:02 +00:00
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(table
|
|
|
|
(identifier)
|
|
|
|
(identifier)
|
2023-10-09 18:39:47 +00:00
|
|
|
(expression
|
2023-10-01 04:01:02 +00:00
|
|
|
(value
|
2023-10-09 18:39:47 +00:00
|
|
|
(list
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(string)))
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(integer))))))))))))
|
2023-09-29 20:34:20 +00:00
|
|
|
|
|
|
|
==================
|
|
|
|
Table Assignment
|
|
|
|
==================
|
|
|
|
|
|
|
|
foobar = table <text, number> {
|
|
|
|
['answer', 42]
|
|
|
|
}
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
(root
|
|
|
|
(item
|
|
|
|
(statement
|
2023-10-06 02:05:18 +00:00
|
|
|
(assignment
|
|
|
|
(identifier)
|
2023-10-09 18:39:47 +00:00
|
|
|
(assignment_operator)
|
2023-10-06 10:18:02 +00:00
|
|
|
(statement
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(table
|
|
|
|
(identifier)
|
|
|
|
(identifier)
|
2023-10-09 18:39:47 +00:00
|
|
|
(expression
|
2023-10-06 10:18:02 +00:00
|
|
|
(value
|
2023-10-09 18:39:47 +00:00
|
|
|
(list
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(string)))
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(integer))))))))))))))
|
2023-10-06 02:05:18 +00:00
|
|
|
|
2023-09-29 20:54:13 +00:00
|
|
|
==================
|
|
|
|
Table Access
|
|
|
|
==================
|
|
|
|
|
|
|
|
select number from foobar where text == 'answer'
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
(root
|
|
|
|
(item
|
|
|
|
(statement
|
2023-10-06 02:05:18 +00:00
|
|
|
(select
|
|
|
|
(identifier)
|
|
|
|
(identifier)
|
|
|
|
(expression
|
|
|
|
(logic
|
|
|
|
(expression
|
|
|
|
(identifier))
|
2023-10-06 02:34:53 +00:00
|
|
|
(logic_operator)
|
2023-10-06 02:05:18 +00:00
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(string)))))))))
|
2023-09-30 20:06:01 +00:00
|
|
|
|
2023-09-29 20:54:13 +00:00
|
|
|
|
|
|
|
==================
|
|
|
|
Table Insert
|
|
|
|
==================
|
|
|
|
|
|
|
|
insert ['bob was here', 0] into foobar
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
(root
|
|
|
|
(item
|
|
|
|
(statement
|
2023-10-06 02:05:18 +00:00
|
|
|
(insert
|
|
|
|
(list
|
2023-10-09 18:39:47 +00:00
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(string)))
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(integer))))
|
2023-10-06 02:05:18 +00:00
|
|
|
(identifier)))))
|