From ff92e434b81ec7eb877493f1e1e71a27f462514f Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 25 Nov 2016 22:14:04 -0800 Subject: 3691 Expand 'assert' to handle non-literal texts. --- 029tools.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '029tools.cc') diff --git a/029tools.cc b/029tools.cc index 79f6ba84..67c58154 100644 --- a/029tools.cc +++ b/029tools.cc @@ -210,8 +210,8 @@ case ASSERT: { raise << maybe(get(Recipe, r).name) << "'assert' requires a boolean for its first ingredient, but got '" << inst.ingredients.at(0).original_string << "'\n" << end(); break; } - if (!is_literal_text(inst.ingredients.at(1))) { - raise << maybe(get(Recipe, r).name) << "'assert' requires a literal string for its second ingredient, but got '" << inst.ingredients.at(1).original_string << "'\n" << end(); + if (!is_mu_text(inst.ingredients.at(1))) { + raise << maybe(get(Recipe, r).name) << "'assert' requires a text as its second ingredient, but got '" << inst.ingredients.at(1).original_string << "'\n" << end(); break; } break; @@ -219,7 +219,7 @@ case ASSERT: { :(before "End Primitive Recipe Implementations") case ASSERT: { if (!ingredients.at(0).at(0)) { - raise << current_instruction().ingredients.at(1).name << '\n' << end(); + raise << read_mu_text(ingredients.at(1).at(0)) << '\n' << end(); } break; } -- cgit 1.4.1-2-gfad0