79 lines
1.2 KiB
Plaintext
79 lines
1.2 KiB
Plaintext
==================
|
|
Simple Maps
|
|
==================
|
|
|
|
map {
|
|
answer = 42
|
|
}
|
|
|
|
---
|
|
|
|
(root
|
|
(item
|
|
(statement
|
|
(open_statement
|
|
(expression
|
|
(value
|
|
(map
|
|
(identifier)
|
|
(value
|
|
(integer)))))))))
|
|
|
|
==================
|
|
Map Assignment
|
|
==================
|
|
|
|
x = map {
|
|
answer = 42
|
|
}
|
|
|
|
---
|
|
|
|
(root
|
|
(item
|
|
(statement
|
|
(open_statement
|
|
(expression
|
|
(operation
|
|
(expression
|
|
(identifier))
|
|
(operator)
|
|
(expression
|
|
(value
|
|
(map
|
|
(identifier)
|
|
(value
|
|
(integer)))))))))))
|
|
|
|
==================
|
|
Map Access
|
|
==================
|
|
|
|
x = map {
|
|
answer = 42
|
|
}
|
|
|
|
x.answer
|
|
|
|
---
|
|
|
|
(root
|
|
(item
|
|
(statement
|
|
(open_statement
|
|
(expression
|
|
(operation
|
|
(expression
|
|
(identifier))
|
|
(operator)
|
|
(expression
|
|
(value
|
|
(map
|
|
(identifier)
|
|
(value
|
|
(integer))))))))))
|
|
(item
|
|
(statement
|
|
(open_statement
|
|
(expression
|
|
(identifier)))))) |