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

75 lines
1.9 KiB
Plaintext
Raw Normal View History

2023-11-11 01:44:03 +00:00
================================================================================
Simple Map
2023-11-11 01:44:03 +00:00
================================================================================
2023-10-31 09:51:37 +00:00
{ answer = 42 }
2023-11-11 01:44:03 +00:00
--------------------------------------------------------------------------------
(root
2023-11-11 01:44:03 +00:00
(statement
(block
(statement
(assignment
(identifier)
(assignment_operator)
(statement
(expression
(value
(integer)))))))))
2023-11-11 01:44:03 +00:00
================================================================================
2023-10-31 09:51:37 +00:00
Nested Maps
2023-11-11 01:44:03 +00:00
================================================================================
x = {
2023-10-31 09:51:37 +00:00
y = {
foo = 'bar'
z = {
message = 'hiya'
}
}
f = 12
}
2023-11-11 01:44:03 +00:00
--------------------------------------------------------------------------------
(root
2023-11-11 01:44:03 +00:00
(statement
(assignment
(identifier)
(assignment_operator)
(statement
(block
(statement
(assignment
(identifier)
(assignment_operator)
(statement
(expression
(value
(map
(identifier)
(statement
(expression
(value
(string))))
(identifier)
(statement
(expression
(value
(map
(identifier)
(statement
(expression
(value
(string))))))))))))))
(statement
(assignment
(identifier)
(assignment_operator)
(statement
(expression
(value
(integer)))))))))))