diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-11-25 22:14:04 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-11-25 22:14:04 -0800 |
commit | ff92e434b81ec7eb877493f1e1e71a27f462514f (patch) | |
tree | d243a2202dbc5dca5b3f8bb18ab27d6dc5733a7c /029tools.cc | |
parent | 4beaf39d4ffa1502a1697f831cc5639e38aa7374 (diff) | |
download | mu-ff92e434b81ec7eb877493f1e1e71a27f462514f.tar.gz |
3691
Expand 'assert' to handle non-literal texts.
Diffstat (limited to '029tools.cc')
-rw-r--r-- | 029tools.cc | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |