1
0
dust/tree-sitter-dust/corpus/while.txt

68 lines
1.1 KiB
Plaintext
Raw Normal View History

==================
While Loop
==================
while true {
(output "This is a bad idea...")
}
---
(root
2023-10-31 09:51:37 +00:00
(statement
(while
(expression
(value
(boolean)))
(statement
(expression
2023-10-31 09:51:37 +00:00
(tool
(expression
2023-10-31 09:51:37 +00:00
(value
(string)))))))))
==================
2023-10-31 09:51:37 +00:00
Nested While Loop
==================
2023-10-31 09:51:37 +00:00
while true {
x = 4
while x > 0 {
x -= 1
}
}
---
(root
2023-10-31 09:51:37 +00:00
(statement
(while
(expression
(value
(boolean)))
(statement
(assignment
(identifier)
(assignment_operator)
(statement
(expression
(value
2023-10-31 10:21:21 +00:00
(integer)))))
(while
(expression
(logic
2023-10-31 09:51:37 +00:00
(expression
2023-10-31 10:21:21 +00:00
(identifier))
(logic_operator)
(expression
(value
(integer)))))
(statement
(assignment
(identifier)
(assignment_operator)
(statement
2023-10-31 10:21:21 +00:00
(expression
(value
(integer)))))))))))