1
0
dust/tree-sitter-dust/corpus/while.txt
2023-10-31 05:51:37 -04:00

68 lines
1.2 KiB
Plaintext

==================
While Loop
==================
while true {
(output "This is a bad idea...")
}
---
(root
(statement
(while
(expression
(value
(boolean)))
(statement
(expression
(tool
(expression
(value
(string)))))))))
==================
Nested While Loop
==================
while true {
x = 4
while x > 0 {
x -= 1
}
}
---
(root
(statement
(while
(expression
(value
(boolean)))
(statement
(assignment
(identifier)
(assignment_operator)
(statement
(expression
(value
(integer)))
(while
(expression
(logic
(expression
(identifier))
(logic_operator)
(expression
(value
(integer)))))
(statement
(assignment
(identifier)
(assignment_operator)
(statement
(expression
(value
(integer)))))))))))))