Package org.renjin.sexp

Examples of org.renjin.sexp.FunctionCall


    // class(x$a[3]) <- "foo"

    SEXP lhs = assignment.getArgument(0);
   
    while(lhs instanceof FunctionCall) {
      FunctionCall call = (FunctionCall) lhs;
     
      rhs = builder.translateSetterCall(context, call, rhs);
      lhs = call.getArgument(0);
    }

    LValue target;
    if( lhs instanceof Symbol) {
      target = new EnvironmentVariable((Symbol) lhs);
View Full Code Here


      TranslationContext context, FunctionCall call) {
    SEXP argument = call.getArgument(0);
    if(!(argument instanceof FunctionCall)) {
      throw new InvalidSyntaxException(".Internal() expects a language object as its only argument");
    }
    FunctionCall primitiveCall = (FunctionCall) argument;

    return builder.translatePrimitiveCall(context, primitiveCall);
  }
View Full Code Here

    SEXP arg = call.getArgument(0);
    assert arg!=null;
    if(!(arg instanceof FunctionCall)) {
      throw new EvalException("invalid .Internal() argument");
    }
    FunctionCall internalCall = (FunctionCall) arg;
    Symbol internalName = (Symbol)internalCall.getFunction();
    SEXP function = Primitives.getInternal(internalName);
    if(function==null || function == Null.INSTANCE) {
      throw new EvalException(String.format("no internal function \"%s\"", internalName.getPrintName()));
    }
    return ((Function)function).apply(context, rho, internalCall, internalCall.getArguments());
  }
View Full Code Here

  @Override
  public FunctionCall apply(Context context, Environment rho, FunctionCall call,
      PairList args) {
 
    return new FunctionCall(call.getFunction(), call.getArguments(),
        AttributeMap.builder()
          .setClass("formula")
          .set(Symbols.DOT_ENVIRONMENT, rho)
          .build());
  }
View Full Code Here

TOP

Related Classes of org.renjin.sexp.FunctionCall

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.