about summary refs log tree commit diff stats
path: root/054dilated_reagent.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-10-27 14:38:57 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-10-27 14:38:57 -0700
commita17f9186c17073e07eef6f046dcc1b15f08ed73c (patch)
treedec42cd5528b10c6a7cb6fb887342e5b526f62eb /054dilated_reagent.cc
parent79eef536f5fc2c427e3601e0dcca705aad1d7023 (diff)
downloadmu-a17f9186c17073e07eef6f046dcc1b15f08ed73c.tar.gz
2291 - parsing property trees
Diffstat (limited to '054dilated_reagent.cc')
-rw-r--r--054dilated_reagent.cc10
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))"}