81 lines
2.0 KiB
Plaintext
81 lines
2.0 KiB
Plaintext
================================================================================
|
|
Simple Assignment
|
|
================================================================================
|
|
|
|
x = y
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(root
|
|
(statement
|
|
(assignment
|
|
(identifier)
|
|
(assignment_operator)
|
|
(statement
|
|
(expression
|
|
(identifier))))))
|
|
|
|
================================================================================
|
|
Simple Assignment with Type
|
|
================================================================================
|
|
|
|
x <int> = y
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(root
|
|
(statement
|
|
(assignment
|
|
(identifier)
|
|
(type_specification
|
|
(type))
|
|
(assignment_operator)
|
|
(statement
|
|
(expression
|
|
(identifier))))))
|
|
|
|
================================================================================
|
|
Map Item Assignment
|
|
================================================================================
|
|
|
|
x:y = 1
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(root
|
|
(statement
|
|
(index_assignment
|
|
(index
|
|
(index_expression
|
|
(identifier))
|
|
(index_expression
|
|
(identifier)))
|
|
(assignment_operator)
|
|
(statement
|
|
(expression
|
|
(value
|
|
(integer)))))))
|
|
|
|
================================================================================
|
|
List Item Assignment
|
|
================================================================================
|
|
|
|
x:9 = 'foobar'
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(root
|
|
(statement
|
|
(index_assignment
|
|
(index
|
|
(index_expression
|
|
(identifier))
|
|
(index_expression
|
|
(value
|
|
(integer))))
|
|
(assignment_operator)
|
|
(statement
|
|
(expression
|
|
(value
|
|
(string)))))))
|