throw new ScopeException("Out of memory");
case FAILURE:
throw new ScopeException("Could not execute script");
}
Value value = result.getValue();
Type type = value.getType();
switch (type) {
case STRING:
return value.getStr();
case FALSE:
return false;
case TRUE:
return true;
case OBJECT:
return value.getObject();
case NUMBER:
return parseNumber(String.valueOf(value.getNumber()));
case NAN:
return Float.NaN;
case MINUS_INFINITY:
return Float.NEGATIVE_INFINITY;
case PLUS_INFINITY: