From dcc060c7d4ef56b978beb34ddce8d8ffcec94fa6 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 25 Feb 2016 17:17:20 -0800 Subject: 2706 - update html --- html/042name.cc.html | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'html/042name.cc.html') diff --git a/html/042name.cc.html b/html/042name.cc.html index b39670fb..e3b73f35 100644 --- a/html/042name.cc.html +++ b/html/042name.cc.html @@ -109,7 +109,7 @@ void transform_names(const recipe_ordinal r(/*mutable*/ reagent& x, const instruction& inst, const string& recipe_name) { if (!x.type) { // End Null-type is_disqualified Exceptions - raise_error << maybe(recipe_name) << "missing type for " << x.original_string << " in '" << inst.to_string() << "'\n" << end(); + raise_error << maybe(recipe_name) << "missing type for " << x.original_string << " in '" << to_string(inst) << "'\n" << end(); return true; } if (is_raw(x)) return true; @@ -140,9 +140,8 @@ type_ordinal skip_addresses(type_tree* type(const type_ordinal t, const string& name, const string& recipe_name) { const type_info& container = get(Type, t); - for (long long int i = 0; i < SIZE(container.element_names); ++i) { - if (container.element_names.at(i) == name) return i; - } + for (long long int i = 0; i < SIZE(container.elements); ++i) + if (container.elements.at(i).name == name) return i; raise_error << maybe(recipe_name) << "unknown element " << name << " in container " << get(Type, t).name << '\n' << end(); return -1; } @@ -220,10 +219,6 @@ $error: 0 //:: Support element names for containers in 'get' and 'get-address'. -//: update our running example container for the next test -:(before "End Mu Types Initialization") -get(Type, point).element_names.push_back("x"); -get(Type, point).element_names.push_back("y"); :(scenario transform_names_transforms_container_elements) recipe main [ p:address:point <- copy 0 @@ -237,7 +232,7 @@ recipe main [ // replace element names of containers with offsets if (inst.name == "get" || inst.name == "get-address") { if (SIZE(inst.ingredients) != 2) { - raise_error << maybe(get(Recipe, r).name) << "exactly 2 ingredients expected in '" << inst.to_string() << "'\n" << end(); + raise_error << maybe(get(Recipe, r).name) << "exactly 2 ingredients expected in '" << to_string(inst) << "'\n" << end(); break; } if (!is_literal(inst.ingredients.at(1))) @@ -279,7 +274,7 @@ recipe main [ // convert variant names of exclusive containers if (inst.name == "maybe-convert") { if (SIZE(inst.ingredients) != 2) { - raise_error << maybe(get(Recipe, r).name) << "exactly 2 ingredients expected in '" << inst.to_string() << "'\n" << end(); + raise_error << maybe(get(Recipe, r).name) << "exactly 2 ingredients expected in '" << to_string(inst) << "'\n" << end(); break; } assert(is_literal(inst.ingredients.at(1))); -- cgit 1.4.1-2-gfad0