1
0

65 lines
1.5 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 {
2023-12-29 20:14:03 -05:00
output ("This is a bad idea...")
}
2023-10-31 15:21:13 -04:00
--------------------------------------------------------------------------------
(root
2023-11-10 20:44:03 -05:00
(statement
(while
(expression
(value
(boolean)))
(block
(statement
(expression
(function_call
(function_expression
(identifier))
2023-11-29 19:23:42 -05:00
(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-11-30 11:05:09 -05: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-11-10 20:44:03 -05:00
(statement
(while
(expression
(value
(boolean)))
(block
(statement
(while
(expression
(logic
(expression
(identifier))
(logic_operator)
(expression
(value
(integer)))))
(block
(statement
(assignment
(identifier)
(assignment_operator)
(statement
(expression
(value
(integer)))))))))))))