add is_undef functionality to boxed_value

This commit is contained in:
Jason Turner
2009-11-08 15:16:15 +00:00
parent 4e5c972e66
commit fe5a935abd
7 changed files with 21 additions and 14 deletions

View File

@@ -171,7 +171,7 @@ namespace chaiscript
Boxed_Value lhs = eval_token(ss, node->children[i]);
try {
if (lhs.is_unknown())
if (lhs.is_undef())
{
retval = ss.call_function("clone", Param_List_Builder() << retval);
}
@@ -191,7 +191,7 @@ namespace chaiscript
}
else if (node->children[i+1]->text == ":=") {
Boxed_Value lhs = eval_token(ss, node->children[i]);
if (lhs.is_unknown() || type_match(lhs, retval)) {
if (lhs.is_undef() || type_match(lhs, retval)) {
lhs.assign(retval);
}
else {