1
0
dust/tree-sitter-dust/corpus/assignment.txt

89 lines
2.2 KiB
Plaintext

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