diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-07-25 14:19:28 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-07-25 17:14:58 -0700 |
commit | e46306432ddb75a89f69d92ccc175a23f0b72072 (patch) | |
tree | 48ed3828064f29cefaf14e3fe61d7dc02cac0e80 /027trace.cc | |
parent | e83602d3917eba137cd8fb37605076fff5a746b1 (diff) | |
download | mu-e46306432ddb75a89f69d92ccc175a23f0b72072.tar.gz |
1848 - core instructions now check for ingredients
Also standardized warnings.
Diffstat (limited to '027trace.cc')
-rw-r--r-- | 027trace.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/027trace.cc b/027trace.cc index 12cc7ca3..742432fa 100644 --- a/027trace.cc +++ b/027trace.cc @@ -12,6 +12,10 @@ TRACE, Recipe_ordinal["trace"] = TRACE; :(before "End Primitive Recipe Implementations") case TRACE: { + if (SIZE(ingredients) != 2) { + raise << current_recipe_name() << ": 'trace' takes exactly two ingredients rather than '" << current_instruction().to_string() << "'\n" << end(); + break; + } assert(is_literal(current_instruction().ingredients.at(0))); string label = current_instruction().ingredients.at(0).name; assert(is_literal(current_instruction().ingredients.at(1))); |