diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-10-27 14:38:57 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-10-27 14:38:57 -0700 |
commit | a17f9186c17073e07eef6f046dcc1b15f08ed73c (patch) | |
tree | dec42cd5528b10c6a7cb6fb887342e5b526f62eb /054dilated_reagent.cc | |
parent | 79eef536f5fc2c427e3601e0dcca705aad1d7023 (diff) | |
download | mu-a17f9186c17073e07eef6f046dcc1b15f08ed73c.tar.gz |
2291 - parsing property trees
Diffstat (limited to '054dilated_reagent.cc')
-rw-r--r-- | 054dilated_reagent.cc | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/054dilated_reagent.cc b/054dilated_reagent.cc index 7cfdafa9..21567a03 100644 --- a/054dilated_reagent.cc +++ b/054dilated_reagent.cc @@ -77,9 +77,9 @@ if (s.at(0) == '{') { string key = slurp_key(in); if (key.empty()) continue; if (key == "}") continue; - string value = next_word(in); + string_tree* value = new string_tree(next_word(in)); // End Parsing Reagent Property(value) - properties.push_back(pair<string, string_tree*>(key, new string_tree(value))); + properties.push_back(pair<string, string_tree*>(key, value)); } // structures for the first row of properties name = properties.at(0).first; @@ -100,9 +100,3 @@ string slurp_key(istream& in) { } return result; } - -:(scenario dilated_reagent_with_nested_brackets) -recipe main [ - {1: number, foo: (bar (baz quux))} <- copy 34 -] -+parse: product: {"1": "number", "foo": "(bar (baz quux))"} |