tree-sitter-dust/corpus/statements.txt

74 lines
1008 B
Plaintext

==================
Simple Statements
==================
1
"one"
x
---
(root
(item
(statement
(expression
(value
(integer)))))
(item
(statement
(expression
(value
(string)))))
(item
(statement
(expression
(identifier)))))
==================
Simple Assignment
==================
x = 1
y = "one"
---
(root
(item
(statement
(assignment
(identifier)
(expression
(value
(integer))))))
(item
(statement
(assignment
(identifier)
(expression
(value
(string)))))))
==================
Complex Assignment
==================
x = 1 + 1
--
(root
(item
(statement
(assignment
(identifier)
(expression
(math
(expression
(value
(integer)))
(math_operator)
(expression
(value
(integer)))))))))