about summary refs log tree commit diff stats
path: root/014literal_string.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 /014literal_string.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 '014literal_string.cc')
-rw-r--r--014literal_string.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/014literal_string.cc b/014literal_string.cc
index c06e4f35..7986d0f3 100644
--- a/014literal_string.cc
+++ b/014literal_string.cc
@@ -7,13 +7,13 @@
 
 :(scenarios load)
 :(scenario string_literal)
-recipe main [
+def main [
   1:address:array:character <- copy [abc def]  # copy can't really take a string
 ]
 +parse:   ingredient: "abc def": "literal-string"
 
 :(scenario string_literal_with_colons)
-recipe main [
+def main [
   1:address:array:character <- copy [abc:def/ghi]
 ]
 +parse:   ingredient: "abc:def/ghi": "literal-string"
@@ -145,26 +145,26 @@ void strip_last(string& s) {
 }
 
 :(scenario string_literal_nested)
-recipe main [
+def main [
   1:address:array:character <- copy [abc [def]]
 ]
 +parse:   ingredient: "abc [def]": "literal-string"
 
 :(scenario string_literal_escaped)
-recipe main [
+def main [
   1:address:array:character <- copy [abc \[def]
 ]
 +parse:   ingredient: "abc [def": "literal-string"
 
 :(scenario string_literal_escaped_comment_aware)
-recipe main [
+def main [
   1:address:array:character <- copy [
 abc \\\[def]
 ]
 +parse:   ingredient: "\nabc \[def": "literal-string"
 
 :(scenario string_literal_and_comment)
-recipe main [
+def main [
   1:address:array:character <- copy [abc]  # comment
 ]
 +parse: --- defining main
@@ -174,14 +174,14 @@ recipe main [
 +parse:   product: 1: ("address" "array" "character")
 
 :(scenario string_literal_escapes_newlines_in_trace)
-recipe main [
+def main [
   copy [abc
 def]
 ]
 +parse:   ingredient: "abc\ndef": "literal-string"
 
 :(scenario string_literal_can_skip_past_comments)
-recipe main [
+def main [
   copy [
     # ']' inside comment
     bar
@@ -190,7 +190,7 @@ recipe main [
 +parse:   ingredient: "\n    # ']' inside comment\n    bar\n  ": "literal-string"
 
 :(scenario string_literal_empty)
-recipe main [
+def main [
   copy []
 ]
 +parse:   ingredient: "": "literal-string"