tree-sitter-dust/corpus/maps.txt
2023-09-29 15:25:10 -04:00

79 lines
1.2 KiB
Plaintext

==================
Simple Maps
==================
map {
answer = 42
}
---
(root
(item
(statement
(open_statement
(expression
(value
(map
(identifier)
(value
(integer)))))))))
==================
Map Assignment
==================
x = map {
answer = 42
}
---
(root
(item
(statement
(open_statement
(expression
(operation
(expression
(identifier))
(operator)
(expression
(value
(map
(identifier)
(value
(integer)))))))))))
==================
Map Access
==================
x = map {
answer = 42
}
x.answer
---
(root
(item
(statement
(open_statement
(expression
(operation
(expression
(identifier))
(operator)
(expression
(value
(map
(identifier)
(value
(integer))))))))))
(item
(statement
(open_statement
(expression
(identifier))))))