diff options
Diffstat (limited to '040brace.cc')
-rw-r--r-- | 040brace.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/040brace.cc b/040brace.cc index 8cd7e622..02e3e210 100644 --- a/040brace.cc +++ b/040brace.cc @@ -61,7 +61,7 @@ void transform_braces(const recipe_ordinal r) { } if (inst.label == "}") { if (open_braces.empty()) { - raise << "missing '{' in " << get(Recipe, r).name << '\n' << end(); + raise << "missing '{' in '" << get(Recipe, r).name << "'\n" << end(); return; } open_braces.pop(); @@ -80,7 +80,7 @@ void transform_braces(const recipe_ordinal r) { // check for errors if (inst.old_name.find("-if") != string::npos || inst.old_name.find("-unless") != string::npos) { if (inst.ingredients.empty()) { - raise << inst.old_name << " expects 1 or 2 ingredients, but got none\n" << end(); + raise << "'" << inst.old_name << "' expects 1 or 2 ingredients, but got none\n" << end(); continue; } } @@ -117,7 +117,7 @@ void transform_braces(const recipe_ordinal r) { target.type = new type_tree("offset", get(Type_ordinal, "offset")); target.set_value(0); if (open_braces.empty()) - raise << inst.old_name << " needs a '{' before\n" << end(); + raise << "'" << inst.old_name << "' needs a '{' before\n" << end(); else if (inst.old_name.find("loop") != string::npos) target.set_value(open_braces.top()-index); else // break instruction @@ -350,7 +350,7 @@ def test-factorial [ def main [ break ] -+error: break needs a '{' before ++error: 'break' needs a '{' before :(scenario break_conditional_without_ingredient_fails) % Hide_errors = true; @@ -359,7 +359,7 @@ def main [ break-if } ] -+error: break-if expects 1 or 2 ingredients, but got none ++error: 'break-if' expects 1 or 2 ingredients, but got none //: Using break we can now implement conditional returns. |