tree-sitter-dust/corpus/statements.txt

117 lines
2.0 KiB
Plaintext
Raw Normal View History

2023-09-27 21:41:39 +00:00
==================
Simple Statements
==================
2023-09-29 17:04:19 +00:00
1
"one"
x
2023-09-27 21:41:39 +00:00
---
2023-10-01 04:01:02 +00:00
2023-09-29 13:53:53 +00:00
(root
(item
(statement
2023-10-01 04:01:02 +00:00
(expression
(value
(integer)))))
2023-09-29 13:53:53 +00:00
(item
(statement
2023-10-01 04:01:02 +00:00
(expression
(value
(string)))))
2023-09-29 13:53:53 +00:00
(item
(statement
2023-10-01 04:01:02 +00:00
(expression
(identifier)))))
2023-09-27 21:41:39 +00:00
==================
Simple Assignment
==================
2023-09-29 17:04:19 +00:00
x = 1
y = "one"
2023-09-27 21:41:39 +00:00
---
2023-09-29 13:53:53 +00:00
(root
(item
2023-10-06 10:18:02 +00:00
(statement
2023-10-06 02:05:18 +00:00
(assignment
(identifier)
2023-10-09 18:39:47 +00:00
(assignment_operator)
2023-10-06 10:18:02 +00:00
(statement
(expression
(value
(integer)))))))
2023-09-29 13:53:53 +00:00
(item
2023-10-06 10:18:02 +00:00
(statement
2023-10-06 02:05:18 +00:00
(assignment
(identifier)
2023-10-09 18:39:47 +00:00
(assignment_operator)
2023-10-06 10:18:02 +00:00
(statement
(expression
(value
(string))))))))
2023-09-27 23:10:21 +00:00
==================
Complex Assignment
==================
2023-09-29 17:04:19 +00:00
x = 1 + 1
2023-09-27 23:10:21 +00:00
---
(root
(item
(statement
(assignment
(identifier)
(assignment_operator)
(statement
(expression
(math
(expression
(value
(integer)))
(math_operator)
(expression
(value
(integer))))))))))
==================
Expression Precedence
==================
x = (3 == (1 + (2 + 2)))
---
2023-09-27 23:10:21 +00:00
2023-09-29 13:53:53 +00:00
(root
(item
(statement
2023-10-06 02:05:18 +00:00
(assignment
(identifier)
2023-10-09 18:39:47 +00:00
(assignment_operator)
(statement
(expression
(logic
(expression
(value
(integer)))
(logic_operator)
(expression
(math
(expression
(value
(integer)))
(math_operator)
(expression
(math
(expression
(value
(integer)))
(math_operator)
(expression
(value
(integer))))))))))))))