From e4ac3c9e6e5464a0fc0f8fd3763a572e0e180c04 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sat, 1 Dec 2018 14:13:33 -0800 Subject: 4814 --- html/023boolean.cc.html | 52 +++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 25 deletions(-) (limited to 'html/023boolean.cc.html') diff --git a/html/023boolean.cc.html b/html/023boolean.cc.html index bda78f0c..1f73953a 100644 --- a/html/023boolean.cc.html +++ b/html/023boolean.cc.html @@ -11,21 +11,22 @@ @@ -59,27 +60,28 @@ if ('onhashchange' in window) { +https://github.com/akkartik/mu/blob/master/023boolean.cc
   1 //: Boolean primitives
   2 
   3 :(before "End Primitive Recipe Declarations")
   4 AND,
   5 :(before "End Primitive Recipe Numbers")
-  6 put(Recipe_ordinal, "and", AND);
+  6 put(Recipe_ordinal, "and", AND);
   7 :(before "End Primitive Recipe Checks")
   8 case AND: {
   9   for (int i = 0;  i < SIZE(inst.ingredients);  ++i) {
  10     if (!is_mu_scalar(inst.ingredients.at(i))) {
- 11       raise << maybe(get(Recipe, r).name) << "'and' requires boolean ingredients, but got '" << inst.ingredients.at(i).original_string << "'\n" << end();
+ 11       raise << maybe(get(Recipe, r).name) << "'and' requires boolean ingredients, but got '" << inst.ingredients.at(i).original_string << "'\n" << end();
  12       goto finish_checking_instruction;
  13     }
  14   }
  15   if (SIZE(inst.products) > 1) {
- 16     raise << maybe(get(Recipe, r).name) << "'and' yields exactly one product in '" << to_original_string(inst) << "'\n" << end();
+ 16     raise << maybe(get(Recipe, r).name) << "'and' yields exactly one product in '" << to_original_string(inst) << "'\n" << end();
  17     break;
  18   }
  19   if (!inst.products.empty() && !is_dummy(inst.products.at(0)) && !is_mu_boolean(inst.products.at(0))) {
- 20     raise << maybe(get(Recipe, r).name) << "'and' should yield a boolean, but got '" << inst.products.at(0).original_string << "'\n" << end();
+ 20     raise << maybe(get(Recipe, r).name) << "'and' should yield a boolean, but got '" << inst.products.at(0).original_string << "'\n" << end();
  21     break;
  22   }
  23   break;
@@ -129,21 +131,21 @@ if ('onhashchange' in window) {
  67 :(before "End Primitive Recipe Declarations")
  68 OR,
  69 :(before "End Primitive Recipe Numbers")
- 70 put(Recipe_ordinal, "or", OR);
+ 70 put(Recipe_ordinal, "or", OR);
  71 :(before "End Primitive Recipe Checks")
  72 case OR: {
  73   for (int i = 0;  i < SIZE(inst.ingredients);  ++i) {
  74     if (!is_mu_scalar(inst.ingredients.at(i))) {
- 75       raise << maybe(get(Recipe, r).name) << "'and' requires boolean ingredients, but got '" << inst.ingredients.at(i).original_string << "'\n" << end();
+ 75       raise << maybe(get(Recipe, r).name) << "'and' requires boolean ingredients, but got '" << inst.ingredients.at(i).original_string << "'\n" << end();
  76       goto finish_checking_instruction;
  77     }
  78   }
  79   if (SIZE(inst.products) > 1) {
- 80     raise << maybe(get(Recipe, r).name) << "'or' yields exactly one product in '" << to_original_string(inst) << "'\n" << end();
+ 80     raise << maybe(get(Recipe, r).name) << "'or' yields exactly one product in '" << to_original_string(inst) << "'\n" << end();
  81     break;
  82   }
  83   if (!inst.products.empty() && !is_dummy(inst.products.at(0)) && !is_mu_boolean(inst.products.at(0))) {
- 84     raise << maybe(get(Recipe, r).name) << "'or' should yield a boolean, but got '" << inst.products.at(0).original_string << "'\n" << end();
+ 84     raise << maybe(get(Recipe, r).name) << "'or' should yield a boolean, but got '" << inst.products.at(0).original_string << "'\n" << end();
  85     break;
  86   }
  87   break;
@@ -187,23 +189,23 @@ if ('onhashchange' in window) {
 125 :(before "End Primitive Recipe Declarations")
 126 NOT,
 127 :(before "End Primitive Recipe Numbers")
-128 put(Recipe_ordinal, "not", NOT);
+128 put(Recipe_ordinal, "not", NOT);
 129 :(before "End Primitive Recipe Checks")
 130 case NOT: {
 131   if (SIZE(inst.products) != SIZE(inst.ingredients)) {
-132     raise << "ingredients and products should match in '" << to_original_string(inst) << "'\n" << end();
+132     raise << "ingredients and products should match in '" << to_original_string(inst) << "'\n" << end();
 133     break;
 134   }
 135   for (int i = 0;  i < SIZE(inst.ingredients);  ++i) {
 136     if (!is_mu_scalar(inst.ingredients.at(i)) && !is_mu_address(inst.ingredients.at(i))) {
-137       raise << maybe(get(Recipe, r).name) << "'not' requires ingredients that can be interpreted as boolean, but got '" << inst.ingredients.at(i).original_string << "'\n" << end();
+137       raise << maybe(get(Recipe, r).name) << "'not' requires ingredients that can be interpreted as boolean, but got '" << inst.ingredients.at(i).original_string << "'\n" << end();
 138       goto finish_checking_instruction;
 139     }
 140   }
 141   for (int i = 0;  i < SIZE(inst.products);  ++i) {
 142     if (is_dummy(inst.products.at(i))) continue;
 143     if (!is_mu_boolean(inst.products.at(i))) {
-144       raise << maybe(get(Recipe, r).name) << "'not' should yield a boolean, but got '" << inst.products.at(i).original_string << "'\n" << end();
+144       raise << maybe(get(Recipe, r).name) << "'not' should yield a boolean, but got '" << inst.products.at(i).original_string << "'\n" << end();
 145       goto finish_checking_instruction;
 146     }
 147   }
-- 
cgit 1.4.1-2-gfad0