tree-sitter-dust/corpus/statements.txt
2023-09-29 09:53:53 -04:00

95 lines
1.5 KiB
Plaintext

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