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

81 lines
1.9 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)
2023-11-30 00:23:42 +00:00
(type_definition
(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
(expression
(identifier))
(expression
(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
(expression
(identifier))
(expression
(value
(integer))))
(assignment_operator)
(statement
(expression
(value
(string)))))))