about summary refs log tree commit diff stats
path: root/027call_ingredient.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-05-20 22:09:06 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-05-20 22:11:34 -0700
commit9dcbec398c5aedf27757365cc1f4c7c36e138539 (patch)
tree24afbc29a00db1db5b65eb3c390e8d13df7be3ba /027call_ingredient.cc
parent5203ba0c5e806ac8e118362d5e2db952a5433e34 (diff)
downloadmu-9dcbec398c5aedf27757365cc1f4c7c36e138539.tar.gz
2990
Standardize quotes around reagents in error messages.

I'm still sure there's issues. For example, the messages when
type-checking 'copy'. I'm not putting quotes around them because in
layer 60 I end up creating dilated reagents, and then it's a bit much to
have quotes and (two kinds of) brackets. But I'm sure I'm doing that
somewhere..
Diffstat (limited to '027call_ingredient.cc')
-rw-r--r--027call_ingredient.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/027call_ingredient.cc b/027call_ingredient.cc
index 739815ed..fe9db13c 100644
--- a/027call_ingredient.cc
+++ b/027call_ingredient.cc
@@ -57,11 +57,11 @@ case NEXT_INGREDIENT: {
       // no ingredient types since the call might be implicit; assume ingredients are always strings
       // todo: how to test this?
       if (!is_mu_string(product))
-        raise << "main: wrong type for ingredient " << product.original_string << '\n' << end();
+        raise << "main: wrong type for ingredient '" << product.original_string << "'\n" << end();
     }
     else if (!types_coercible(product,
                               current_call().ingredients.at(current_call().next_ingredient_to_process))) {
-      raise << maybe(current_recipe_name()) << "wrong type for ingredient " << product.original_string << '\n' << end();
+      raise << maybe(current_recipe_name()) << "wrong type for ingredient '" << product.original_string << "'\n" << end();
       // End next-ingredient Type Mismatch Error
     }
     products.push_back(
@@ -72,7 +72,7 @@ case NEXT_INGREDIENT: {
   }
   else {
     if (SIZE(current_instruction().products) < 2)
-      raise << maybe(current_recipe_name()) << "no ingredient to save in " << current_instruction().products.at(0).original_string << '\n' << end();
+      raise << maybe(current_recipe_name()) << "no ingredient to save in '" << current_instruction().products.at(0).original_string << "'\n" << end();
     if (current_instruction().products.empty()) break;
     products.resize(2);
     // pad the first product with sufficient zeros to match its type
@@ -92,7 +92,7 @@ def main [
 def f [
   11:number <- next-ingredient
 ]
-+error: f: no ingredient to save in 11:number
++error: f: no ingredient to save in '11:number'
 
 :(scenario rewind_ingredients)
 def main [
@@ -145,7 +145,7 @@ case INGREDIENT: {
     break;
   }
   if (!is_literal(inst.ingredients.at(0)) && !is_mu_number(inst.ingredients.at(0))) {
-    raise << maybe(get(Recipe, r).name) << "'ingredient' expects a literal ingredient, but got " << inst.ingredients.at(0).original_string << '\n' << end();
+    raise << maybe(get(Recipe, r).name) << "'ingredient' expects a literal ingredient, but got '" << inst.ingredients.at(0).original_string << "'\n" << end();
     break;
   }
   break;