</s>Add control flow
authorLuke Lau <luke_lau@icloud.com>
Fri, 8 Nov 2019 15:07:55 +0000 (15:07 +0000)
committerLuke Lau <luke_lau@icloud.com>
Fri, 8 Nov 2019 15:07:55 +0000 (15:07 +0000)
commitf7ddcab1610d50be8e9e286554cd5a8e40f54afa
tree4fdbf4e22df7a6d90adfa3e37101e7a500d313d3
parent72fc33a9378524ebf4997f7e811d59cf055c24af
</s>Add control flow

So far our language can parse and evaluate floating point expressions.
However each expression and it's subexpressions always gets evaluated. To
do more complex computations, we want to be able to control what gets
evaluated and what doesn't.

This is known as control flow, and the two most famous imperative
constructs are probably the if statement and for loop. We will add them
to our language in this chapter, and finally put our boolean expressions
(42 < i) to good use.