diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-05-25 19:33:00 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-05-25 19:33:00 -0700 |
commit | f8b56b793d48f49c3aecbbbb76c77ef1261a0dcf (patch) | |
tree | 957d2eaaf3f7247e1846ad5770edb4b89f8076c7 | |
parent | 9c30b38376e66442e6fde85ef54b959dc548bfe3 (diff) | |
download | mu-f8b56b793d48f49c3aecbbbb76c77ef1261a0dcf.tar.gz |
3009
-rw-r--r-- | 010vm.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/010vm.cc b/010vm.cc index 67dd0e1a..ffa661ef 100644 --- a/010vm.cc +++ b/010vm.cc @@ -275,14 +275,18 @@ reagent::reagent(const string& s) :original_string(s), type(NULL), value(0), ini if (name == "_" && type == NULL) type = new type_tree("literal", get(Type_ordinal, "literal")); // other properties + slurp_properties(in, properties); + // End Parsing reagent +} + +void slurp_properties(istream& in, vector<pair<string, string_tree*> >& out) { while (has_data(in)) { istringstream row(slurp_until(in, '/')); row >> std::noskipws; string key = slurp_until(row, ':'); string_tree* value = parse_property_list(row); - properties.push_back(pair<string, string_tree*>(key, value)); + out.push_back(pair<string, string_tree*>(key, value)); } - // End Parsing reagent } string_tree* parse_property_list(istream& in) { |