1
0

66 lines
1.6 KiB
Plaintext
Raw Normal View History

2023-10-31 15:21:13 -04:00
================================================================================
While Loop
2023-10-31 15:21:13 -04:00
================================================================================
while true {
(output "This is a bad idea...")
}
2023-10-31 15:21:13 -04:00
--------------------------------------------------------------------------------
(root
2023-10-31 09:31:10 -04:00
(block
(statement
(while
(expression
2023-10-31 09:31:10 -04:00
(value
(boolean)))
(block
(statement
(expression
2023-10-31 13:04:22 -04:00
(function_call
2023-10-31 15:21:13 -04:00
(built_in_function
(expression
(value
(string))))))))))))
2023-10-31 15:21:13 -04:00
================================================================================
2023-10-31 05:51:37 -04:00
Nested While Loop
2023-10-31 15:21:13 -04:00
================================================================================
2023-10-31 09:31:10 -04:00
while (true) {
while (x > 0) {
2023-10-31 05:51:37 -04:00
x -= 1
}
}
2023-10-31 15:21:13 -04:00
--------------------------------------------------------------------------------
(root
2023-10-31 09:31:10 -04:00
(block
(statement
(while
(expression
(value
(boolean)))
(block
2023-10-31 05:51:37 -04:00
(statement
2023-10-31 09:31:10 -04:00
(while
2023-10-31 06:21:21 -04:00
(expression
2023-10-31 09:31:10 -04:00
(logic
(expression
(identifier))
(logic_operator)
(expression
(value
(integer)))))
(block
(statement
(assignment
(identifier)
(assignment_operator)
(statement
(expression
(value
2023-10-31 15:21:13 -04:00
(integer))))))))))))))