@Override
 public ReflexValue evaluate(IReflexDebugger debugger, Scope scope) {
   ReflexValue ret;
   debugger.stepStart(this, scope);
   ret =
       importHandler.executeImportFunction(
           this, identifier, params, debugger, scope, possibleNativeCallNode);
   debugger.stepEnd(this, ret, scope);
   return ret;
 }
Beispiel #2
0
  @Override
  public ReflexValue evaluate(IReflexDebugger debugger, Scope scope) {
    debugger.stepStart(this, scope);
    ReflexValue retVal = new ReflexNullValue();

    ReflexValue rv = portExpr.evaluate(debugger, scope);
    String encoded = RaptureURLCoder.encode(rv.toString());
    retVal = new ReflexValue(encoded);
    debugger.stepEnd(this, retVal, scope);
    return retVal;
  }
Beispiel #3
0
  @Override
  public ReflexValue evaluate(IReflexDebugger debugger, Scope scope) {
    debugger.stepStart(this, scope);
    ReflexValue value = expression.evaluate(debugger, scope);
    debugger.recordMessage("Sleeping ");
    if (value.isNumber()) {
      try {
        Thread.sleep(value.asLong());
      } catch (InterruptedException e) {

      }
    }
    debugger.stepEnd(this, new ReflexVoidValue(lineNumber), scope);
    return new ReflexVoidValue(lineNumber);
  }
Beispiel #4
0
  @Override
  public ReflexValue evaluate(IReflexDebugger debugger, Scope scope) {
    debugger.stepStart(this, scope);
    String channel = null;
    if (expression != null) {
      ReflexValue value = expression.evaluate(debugger, scope);
      channel = value.asString();
    }
    String value = handler.getInputHandler().read(channel);
    ReflexValue retValue;

    if (value == null) {
      retValue = new ReflexNullValue(lineNumber);
    } else {
      retValue = new ReflexValue(lineNumber, value);
    }
    debugger.stepEnd(this, retValue, scope);
    return retValue;
  }
Beispiel #5
0
  @Override
  public ReflexValue evaluate(IReflexDebugger debugger, Scope scope) {
    debugger.stepStart(this, scope);
    ReflexValue a = lhs.evaluate(debugger, scope);
    boolean ret = false;

    if (a.isBoolean() && a.asBoolean() == true) {
      ret = true;
    } else {
      ReflexValue b = rhs.evaluate(debugger, scope);
      if (b.isBoolean()) {
        ret = b.asBoolean();
      } else {
        throwError("both must be boolean", lhs, rhs, a, b);
      }
    }
    ReflexValue retVal = new ReflexValue(lineNumber, ret);
    debugger.stepEnd(this, retVal, scope);
    return retVal;
  }