Remove := operator and fix & usage.

This commit is contained in:
Jason Turner
2011-09-24 15:06:31 -06:00
parent a28dfd8695
commit 52d9e1e871
6 changed files with 10 additions and 22 deletions

View File

@@ -302,10 +302,11 @@ namespace chaiscript
/// \todo This does not handle the case of an unassigned reference variable
/// being assigned outside of its declaration
lhs.assign(retval);
return retval;
} else {
retval = t_ss.call_function("clone", retval);
retval.clear_dependencies();
}
retval.clear_dependencies();
}
try {
@@ -319,13 +320,6 @@ namespace chaiscript
throw exception::eval_error("Can not clone right hand side of equation");
}
}
else if (this->children[1]->text == ":=") {
if (lhs.is_undef() || type_match(lhs, retval)) {
lhs.assign(retval);
} else {
throw exception::eval_error("Mismatched types in equation");
}
}
else {
try {
retval = t_ss.call_function(this->children[1]->text, lhs, retval);