about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-09-15 13:23:00 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-09-15 13:23:00 -0700
commitd63cddeac0f5fb7eeaeacf828765965e9b61b6ca (patch)
tree8a5b91a1a377ab94916aeb0dc2fca23ab75de96e
parentb6e33d0222cff567d49aa034900bb5c1db209886 (diff)
downloadmu-d63cddeac0f5fb7eeaeacf828765965e9b61b6ca.tar.gz
3364
-rw-r--r--011load.cc8
-rw-r--r--014literal_string.cc4
-rw-r--r--032array.cc2
-rw-r--r--062convert_ingredients_to_text.cc12
4 files changed, 17 insertions, 9 deletions
diff --git a/011load.cc b/011load.cc
index 9e42e67e..b887c369 100644
--- a/011load.cc
+++ b/011load.cc
@@ -228,6 +228,14 @@ void show_rest_of_stream(istream& in) {
   exit(0);
 }
 
+:(scenario recipe_instead_of_def)
+recipe main [
+  1:number <- copy 23
+]
++parse: instruction: copy
++parse:   ingredient: {23: "literal"}
++parse:   product: {1: "number"}
+
 :(scenario parse_comment_outside_recipe)
 # this comment will be dropped by the tangler, so we need a dummy recipe to stop that
 def f1 [
diff --git a/014literal_string.cc b/014literal_string.cc
index 768ccef3..f5576a31 100644
--- a/014literal_string.cc
+++ b/014literal_string.cc
@@ -220,6 +220,6 @@ def main [
 
 :(scenario multiple_unfinished_recipes)
 % Hide_errors = true;
-recipe f1 [
-recipe f2 [
+def f1 [
+def f2 [
 +error: unbalanced '['
diff --git a/032array.cc b/032array.cc
index f8c26234..17ed9c30 100644
--- a/032array.cc
+++ b/032array.cc
@@ -174,7 +174,7 @@ def main [
 container card [
   rank:number <- next-ingredient
 ]
-recipe foo [
+def foo [
   1:card <- merge 3
   2:number <- get 1:card rank:offset
 ]
diff --git a/062convert_ingredients_to_text.cc b/062convert_ingredients_to_text.cc
index 78765501..bdba51d2 100644
--- a/062convert_ingredients_to_text.cc
+++ b/062convert_ingredients_to_text.cc
@@ -2,7 +2,7 @@
 
 :(scenarios transform)
 :(scenario rewrite_stashes_to_text)
-recipe main [
+def main [
   local-scope
   n:number <- copy 34
   stash n
@@ -11,7 +11,7 @@ recipe main [
 +transform: stash {stash_2_0: ("address" "array" "character")}
 
 :(scenario rewrite_traces_to_text)
-recipe main [
+def main [
   local-scope
   n:number <- copy 34
   trace 2, [app], n
@@ -23,7 +23,7 @@ recipe main [
 //: passing addresses around
 
 :(scenario rewrite_stashes_of_arrays)
-recipe main [
+def main [
   local-scope
   n:address:array:number <- new number:type, 3
   stash *n
@@ -32,7 +32,7 @@ recipe main [
 +transform: stash {stash_2_0: ("address" "array" "character")}
 
 :(scenario ignore_stashes_of_static_arrays)
-recipe main [
+def main [
   local-scope
   n:array:number:3 <- create-array
   stash n
@@ -43,7 +43,7 @@ recipe main [
 container foo [
   x:number
 ]
-recipe bar -> x:foo [
+def bar -> x:foo [
   local-scope
   load-ingredients
   x <- merge 34
@@ -137,7 +137,7 @@ container foo [
   x:number
   y:number
 ]
-recipe main [
+def main [
   local-scope
   x:foo <- merge 34, 35
   stash x