Add table tests
This commit is contained in:
parent
b0b4bfe59e
commit
6774f83879
@ -59,3 +59,79 @@ foobar
|
||||
(open_statement
|
||||
(expression
|
||||
(identifier))))))
|
||||
|
||||
==================
|
||||
Table Access
|
||||
==================
|
||||
|
||||
foobar = table <text, number> {
|
||||
['answer', 42]
|
||||
}
|
||||
|
||||
select number from foobar where text == 'answer'
|
||||
|
||||
---
|
||||
|
||||
(root
|
||||
(item
|
||||
(statement
|
||||
(open_statement
|
||||
(expression
|
||||
(operation
|
||||
(expression
|
||||
(identifier))
|
||||
(operator)
|
||||
(expression
|
||||
(value
|
||||
(table
|
||||
(identifier)
|
||||
(identifier)
|
||||
(list
|
||||
(value
|
||||
(string))
|
||||
(value
|
||||
(integer)))))))))))
|
||||
(item
|
||||
(statement
|
||||
(open_statement
|
||||
(expression
|
||||
(value
|
||||
(42)))))))
|
||||
|
||||
==================
|
||||
Table Insert
|
||||
==================
|
||||
|
||||
foobar = table <text, number> {
|
||||
['answer', 42]
|
||||
}
|
||||
|
||||
insert ['bob was here', 0] into foobar
|
||||
|
||||
---
|
||||
|
||||
(root
|
||||
(item
|
||||
(statement
|
||||
(open_statement
|
||||
(expression
|
||||
(operation
|
||||
(expression
|
||||
(identifier))
|
||||
(operator)
|
||||
(expression
|
||||
(value
|
||||
(table
|
||||
(identifier)
|
||||
(identifier)
|
||||
(list
|
||||
(value
|
||||
(string))
|
||||
(value
|
||||
(integer)))))))))))
|
||||
(item
|
||||
(statement
|
||||
(open_statement
|
||||
(expression
|
||||
(value
|
||||
(42)))))))
|
||||
|
Loading…
Reference in New Issue
Block a user