diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-02-20 08:44:24 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-02-20 08:44:24 -0800 |
commit | 41e6effbbe61951f62ec000c676f625793044549 (patch) | |
tree | f4764fca164024274a5c7ea9a80d9b00dd7e304e /010vm.cc | |
parent | d75103c0c4fb52f09411b79843ab42586c6835ea (diff) | |
download | mu-41e6effbbe61951f62ec000c676f625793044549.tar.gz |
2676 - start coalescing type and type-name trees
Diffstat (limited to '010vm.cc')
-rw-r--r-- | 010vm.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/010vm.cc b/010vm.cc index f4f3cb11..e8c7b78d 100644 --- a/010vm.cc +++ b/010vm.cc @@ -51,11 +51,11 @@ struct instruction { // properties besides types, but we're getting ahead of ourselves. struct reagent { string original_string; - vector<pair<string, string_tree*> > properties; string name; + type_tree* type; + vector<pair<string, string_tree*> > properties; double value; bool initialized; - type_tree* type; reagent(string s); reagent(); ~reagent(); @@ -227,7 +227,7 @@ void instruction::clear() { is_label=false; label.clear(); name.clear(); old_nam bool instruction::is_empty() { return !is_label && name.empty(); } // Reagents have the form <name>:<type>:<type>:.../<property>/<property>/... -reagent::reagent(string s) :original_string(s), value(0), initialized(false), type(NULL) { +reagent::reagent(string s) :original_string(s), type(NULL), value(0), initialized(false) { // Parsing reagent(string s) istringstream in(s); in >> std::noskipws; @@ -342,7 +342,7 @@ string_tree::~string_tree() { delete right; } -reagent::reagent() :value(0), initialized(false), type(NULL) { +reagent::reagent() :type(NULL), value(0), initialized(false) { // The first property is special, so ensure we always have it. // Other properties can be pushed back, but the first must always be // assigned to. |