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/054dilated_reagent.cc.html | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'html/054dilated_reagent.cc.html') diff --git a/html/054dilated_reagent.cc.html b/html/054dilated_reagent.cc.html index 55526228..900a3f8c 100644 --- a/html/054dilated_reagent.cc.html +++ b/html/054dilated_reagent.cc.html @@ -42,7 +42,7 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } recipe main [ {1: number, foo: bar} <- copy 34 ] -+parse: product: {"1": "number", "foo": "bar"} ++parse: product: 1: "number", {"foo": "bar"} :(scenario load_trailing_space_after_curly_bracket) recipe main [ @@ -57,7 +57,7 @@ recipe main [ recipe main [ {1: number, foo: bar} <- copy 34 # test comment ] -+parse: product: {"1": "number", "foo": "bar"} ++parse: product: 1: "number", {"foo": "bar"} $error: 0 :(scenario dilated_reagent_with_comment_immediately_following) @@ -132,6 +132,21 @@ if (s.at(s); in >> std::noskipws; in.get(); // skip '{' + name = slurp_key(in); + if (name.empty()) { + raise_error << "invalid reagent " << s << " without a name\n" << end(); + return; + } + if (name == "}") { + raise_error << "invalid empty reagent " << s << '\n' << end(); + return; + } + { + string_tree* value = new string_tree(next_word(in)); + // End Parsing Reagent Type Property(value) + type = new_type_tree(value); + delete value; + } while (has_data(in)) { string key = slurp_key(in); if (key.empty()) continue; @@ -140,14 +155,6 @@ if (s.at// End Parsing Reagent Property(value) properties.push_back(pair<string, string_tree*>(key, value)); } - // structures for the first row of properties - name = properties.at(0).first; - string type_name = properties.at(0).second->value; - if (!contains_key(Type_ordinal, type_name)) { - // this type can't be an integer literal - put(Type_ordinal, type_name, Next_type_ordinal++); - } - type = new_type_tree(properties.at(0).second); return; } -- cgit 1.4.1-2-gfad0