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

81 lines
2.0 KiB
Plaintext
Raw Permalink Normal View History

2023-11-15 01:00:57 +00:00
================================================================================
Simple Assignment
================================================================================
x = y
--------------------------------------------------------------------------------
(root
(statement
(assignment
(identifier)
(assignment_operator)
(statement
(expression
(identifier))))))
================================================================================
2023-11-27 15:27:44 +00:00
Simple Assignment with Type
================================================================================
x <int> = y
--------------------------------------------------------------------------------
(root
(statement
(assignment
(identifier)
(type_specification
2023-11-30 00:23:42 +00:00
(type))
2023-11-27 15:27:44 +00:00
(assignment_operator)
(statement
(expression
(identifier))))))
================================================================================
2023-11-15 01:00:57 +00:00
Map Item Assignment
================================================================================
x:y = 1
--------------------------------------------------------------------------------
(root
(statement
2023-11-15 01:41:57 +00:00
(index_assignment
2023-11-15 01:00:57 +00:00
(index
(index_expression
2023-11-15 01:00:57 +00:00
(identifier))
(index_expression
2023-11-15 01:00:57 +00:00
(identifier)))
(assignment_operator)
(statement
(expression
(value
(integer)))))))
================================================================================
List Item Assignment
================================================================================
x:9 = 'foobar'
--------------------------------------------------------------------------------
(root
(statement
2023-11-15 01:41:57 +00:00
(index_assignment
2023-11-15 01:00:57 +00:00
(index
(index_expression
2023-11-15 01:00:57 +00:00
(identifier))
(index_expression
2023-11-15 01:00:57 +00:00
(value
(integer))))
(assignment_operator)
(statement
(expression
(value
(string)))))))