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

81 lines
1.9 KiB
Plaintext
Raw Normal View History

2023-11-14 20:00:57 -05:00
================================================================================
Simple Assignment
================================================================================
x = y
--------------------------------------------------------------------------------
(root
(statement
(assignment
(identifier)
(assignment_operator)
(statement
(expression
(identifier))))))
================================================================================
2023-11-27 10:27:44 -05:00
Simple Assignment with Type
================================================================================
x <int> = y
--------------------------------------------------------------------------------
(root
(statement
(assignment
(identifier)
2023-11-29 19:23:42 -05:00
(type_definition
(type))
2023-11-27 10:27:44 -05:00
(assignment_operator)
(statement
(expression
(identifier))))))
================================================================================
2023-11-14 20:00:57 -05:00
Map Item Assignment
================================================================================
x:y = 1
--------------------------------------------------------------------------------
(root
(statement
2023-11-14 20:41:57 -05:00
(index_assignment
2023-11-14 20:00:57 -05:00
(index
(index_expression
2023-11-14 20:00:57 -05:00
(identifier))
(index_expression
2023-11-14 20:00:57 -05:00
(identifier)))
(assignment_operator)
(statement
(expression
(value
(integer)))))))
================================================================================
List Item Assignment
================================================================================
x:9 = 'foobar'
--------------------------------------------------------------------------------
(root
(statement
2023-11-14 20:41:57 -05:00
(index_assignment
2023-11-14 20:00:57 -05:00
(index
(index_expression
2023-11-14 20:00:57 -05:00
(identifier))
(index_expression
2023-11-14 20:00:57 -05:00
(value
(integer))))
(assignment_operator)
(statement
(expression
(value
(string)))))))