Finish up branch implementation

* while and unconditional loops are now supported fully
* break and continue keywords for loop control
* List::thunkify() has been broken into its own structure so it can be
  broken out further as necessary

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2020-11-13 20:00:31 -08:00
parent a9d59be472
commit 6e1a19f341
12 changed files with 407 additions and 237 deletions

View File

@@ -1,13 +1,9 @@
check = fn(num) {
if num < 10 {
println("The number is pretty small.")
} elif num < 100 {
println("That number is getting pretty big.")
} el {
println("Whoa! That number is huge!")
}
}
num = 10
check(1)
check(10)
check(100)
if num < 10 {
println("The number is pretty small.")
} elif num < 100 {
println("That number is getting pretty big.")
} el {
println("Whoa! That number is huge!")
}