QmlJS: Introduce UnknownValue.

To distinguish known-to-be-undefined from a genuinely unknown value.

Change-Id: I606b4ea4d726f94553400b8950d3c0a4e76564a8
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
This commit is contained in:
Christian Kamm
2011-10-10 12:53:28 +02:00
parent 4cb8ec6a32
commit 89ff3cebe6
10 changed files with 105 additions and 76 deletions

View File

@@ -69,8 +69,9 @@ const Value *Evaluate::value(AST::Node *ast)
result = _context->lookupReference(ref);
}
// if evaluation fails, return an unknown value
if (! result)
result = _valueOwner->undefinedValue();
result = _valueOwner->unknownValue();
return result;
}