80 lines
1.9 KiB
Plaintext
80 lines
1.9 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)
|
|
(assignment_operator)
|
|
(statement
|
|
(expression
|
|
(identifier))))))
|
|
|
|
================================================================================
|
|
Map Item Assignment
|
|
================================================================================
|
|
|
|
x:y = 1
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(root
|
|
(statement
|
|
(index_assignment
|
|
(index
|
|
(expression
|
|
(identifier))
|
|
(expression
|
|
(identifier)))
|
|
(assignment_operator)
|
|
(statement
|
|
(expression
|
|
(value
|
|
(integer)))))))
|
|
|
|
================================================================================
|
|
List Item Assignment
|
|
================================================================================
|
|
|
|
x:9 = 'foobar'
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(root
|
|
(statement
|
|
(index_assignment
|
|
(index
|
|
(expression
|
|
(identifier))
|
|
(expression
|
|
(value
|
|
(integer))))
|
|
(assignment_operator)
|
|
(statement
|
|
(expression
|
|
(value
|
|
(string)))))))
|