3008
This commit is contained in:
parent
67a180e330
commit
9c30b38376
4
010vm.cc
4
010vm.cc
|
@ -57,7 +57,7 @@ struct reagent {
|
|||
double value;
|
||||
bool initialized;
|
||||
// End reagent Fields
|
||||
reagent(string s);
|
||||
reagent(const string& s);
|
||||
reagent() :type(NULL), value(0), initialized(false) {}
|
||||
~reagent();
|
||||
void clear();
|
||||
|
@ -258,7 +258,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), type(NULL), value(0), initialized(false) {
|
||||
reagent::reagent(const string& s) :original_string(s), type(NULL), value(0), initialized(false) {
|
||||
// Parsing reagent(string s)
|
||||
istringstream in(s);
|
||||
in >> std::noskipws;
|
||||
|
|
|
@ -107,10 +107,10 @@ void slurp_quoted_comment_aware(istream& in, ostream& out) {
|
|||
:(after "Parsing reagent(string s)")
|
||||
if (s.at(0) == '[') {
|
||||
assert(*s.rbegin() == ']');
|
||||
// delete [] delimiters
|
||||
s.erase(0, 1);
|
||||
strip_last(s);
|
||||
name = s;
|
||||
// delete [] delimiters
|
||||
name.erase(0, 1);
|
||||
strip_last(name);
|
||||
type = new type_tree("literal-string", 0);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue