tree-sitter-dust/corpus/statements.txt

92 lines
1.4 KiB
Plaintext

==================
Simple Statements
==================
1;
"one";
x;
---
(source
(statement
(closed_statement
(expression
(value
(integer)))
(close)))
(statement
(closed_statement
(expression
(value
(string)))
(close)))
(statement
(closed_statement
(expression
(identifier))
(close))))
==================
Simple Assignment
==================
x = 1;
y = "one";
---
(source
(statement
(closed_statement
(expression
(operation
(expression
(identifier))
(operator)
(expression
(value
(integer)))))
(close)))
(statement
(closed_statement
(expression
(operation
(expression
(identifier))
(operator)
(expression
(value
(string)))))
(close))))
==================
Complex Assignment
==================
x = 1 + 1;
---
(source
(statement
(closed_statement
(expression
(operation
(expression
(operation
(expression
(identifier))
(operator)
(expression
(value
(integer)))))
(operator)
(expression
(value
(integer)))))
(close))))