Implement rudimentary control flow

This commit is contained in:
Elnu 2023-05-27 20:34:01 -07:00
parent c0c8153cbe
commit abc17c7c3c
3 changed files with 93 additions and 30 deletions

View file

@ -1,13 +1,14 @@
"Bob sat on the bench."
"Bob" "Good morning!"
"Bob" "I am in a block now!"
"Bob" "Isn't this cool?"
"Bob" "And now we're back in normal indentation."
"Bob" "We can even go multiple levels in!"
"Bob" "How far does the rabbit hole go?"
"Bob" "rabbit hole go?"
"Bob" "go?"
"Bob" "Not sure what came of me there."
"Bob" "I suppose I should eat a potato."
eat "potato" True
"Bob" "Yum!"
# Control testing
"Bob" "I will not say anything"
if False:
"Bob" "W-what? Why am I saying this?"
if True:
"Testing 123"
"..."
"Bob" "Good."
"Bob" "Now I will tell you my favorite food..."
if True:
"Bob" "...cereal!"
if False:
"Bob" "But I actually hate it."
"Bob sat on the bench."