about summary refs log tree commit diff stats
path: root/040brace.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-03-08 01:30:14 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-03-08 01:46:47 -0800
commit1ead356219bb2eb59487d1012f837bd07ec336f5 (patch)
treeaf15f390b81e4d6b3e0940c5756a0d7fd1060bb5 /040brace.cc
parent27ba0937a3747684f299bb7a8b3cdd0fbb689db3 (diff)
downloadmu-1ead356219bb2eb59487d1012f837bd07ec336f5.tar.gz
2735 - define recipes using 'def'
I'm dropping all mention of 'recipe' terminology from the Readme. That
way I hope to avoid further bike-shedding discussions while I very
slowly decide on the right terminology with my students.

I could be smarter in my error messages and use 'recipe' when code uses
it and 'function' otherwise. But what about other words like ingredient?
It would all add complexity that I'm not yet sure is worthwhile. But I
do want separate experiences for veteran programmers reading about Mu on
github and for people learning programming using Mu.
Diffstat (limited to '040brace.cc')
-rw-r--r--040brace.cc34
1 files changed, 17 insertions, 17 deletions
diff --git a/040brace.cc b/040brace.cc
index 6c5adcb5..d9d60078 100644
--- a/040brace.cc
+++ b/040brace.cc
@@ -21,7 +21,7 @@
 
 :(scenarios transform)
 :(scenario brace_conversion)
-recipe main [
+def main [
   {
     break
     1:number <- copy 0
@@ -145,7 +145,7 @@ long long int matching_brace(long long int index, const list<pair<int, long long
 }
 
 :(scenario loop)
-recipe main [
+def main [
   1:number <- copy 0
   2:number <- copy 0
   {
@@ -160,7 +160,7 @@ recipe main [
 +transform: jump -2:offset
 
 :(scenario break_empty_block)
-recipe main [
+def main [
   1:number <- copy 0
   {
     break
@@ -171,7 +171,7 @@ recipe main [
 +transform: jump 0:offset
 
 :(scenario break_cascading)
-recipe main [
+def main [
   1:number <- copy 0
   {
     break
@@ -186,7 +186,7 @@ recipe main [
 +transform: jump 0:offset
 
 :(scenario break_cascading_2)
-recipe main [
+def main [
   1:number <- copy 0
   2:number <- copy 0
   {
@@ -205,7 +205,7 @@ recipe main [
 +transform: jump 0:offset
 
 :(scenario break_if)
-recipe main [
+def main [
   1:number <- copy 0
   2:number <- copy 0
   {
@@ -224,7 +224,7 @@ recipe main [
 +transform: jump 0:offset
 
 :(scenario break_nested)
-recipe main [
+def main [
   1:number <- copy 0
   {
     2:number <- copy 0
@@ -238,7 +238,7 @@ recipe main [
 +transform: jump 4:offset
 
 :(scenario break_nested_degenerate)
-recipe main [
+def main [
   1:number <- copy 0
   {
     2:number <- copy 0
@@ -251,7 +251,7 @@ recipe main [
 +transform: jump 3:offset
 
 :(scenario break_nested_degenerate_2)
-recipe main [
+def main [
   1:number <- copy 0
   {
     2:number <- copy 0
@@ -264,7 +264,7 @@ recipe main [
 
 :(scenario break_label)
 % Hide_errors = true;
-recipe main [
+def main [
   1:number <- copy 0
   {
     break +foo:offset
@@ -273,7 +273,7 @@ recipe main [
 +transform: jump +foo:offset
 
 :(scenario break_unless)
-recipe main [
+def main [
   1:number <- copy 0
   2:number <- copy 0
   {
@@ -288,7 +288,7 @@ recipe main [
 +transform: copy ...
 
 :(scenario loop_unless)
-recipe main [
+def main [
   1:number <- copy 0
   2:number <- copy 0
   {
@@ -303,7 +303,7 @@ recipe main [
 +transform: copy ...
 
 :(scenario loop_nested)
-recipe main [
+def main [
   1:number <- copy 0
   {
     2:number <- copy 0
@@ -318,7 +318,7 @@ recipe main [
 +transform: jump-if 4, -5:offset
 
 :(scenario loop_label)
-recipe main [
+def main [
   1:number <- copy 0
   +foo
   2:number <- copy 0
@@ -330,7 +330,7 @@ recipe main [
 //: test how things actually run
 :(scenarios run)
 :(scenario brace_conversion_and_run)
-recipe test-factorial [
+def test-factorial [
   1:number <- copy 5
   2:number <- copy 1
   {
@@ -347,14 +347,14 @@ recipe test-factorial [
 
 :(scenario break_outside_braces_fails)
 % Hide_errors = true;
-recipe main [
+def main [
   break
 ]
 +error: break needs a '{' before
 
 :(scenario break_conditional_without_ingredient_fails)
 % Hide_errors = true;
-recipe main [
+def main [
   {
     break-if
   }