Examples of FunctionCall


Examples of com.volantis.styling.impl.expressions.FunctionCall

                .returns(result);

        // =====================================================================
        //   Test Expectations
        // =====================================================================
        FunctionCall call = new FunctionCall("fred", stylingFunctionMock,
                argumentsMock);
        call.evaluate(evaluationContextMock);
    }
View Full Code Here

Examples of com.volantis.styling.impl.expressions.FunctionCall

            throw new IllegalStateException("Unknown function '" + name + "'");
        }

        List values = value.getArguments();
        Arguments arguments = compileArguments(values);
        FunctionCall call = new FunctionCall(name, function, arguments);

        compiledValue = new StyleCompiledExpression(call);
    }
View Full Code Here

Examples of de.halirutan.mathematica.parsing.psi.api.FunctionCall

      MathematicaPatternVisitor patternVisitor = new MathematicaPatternVisitor();
      element.accept(patternVisitor);
      mySymbols.addAll(patternVisitor.getPatternSymbols());

    } else if (element instanceof FunctionCall) {
      final FunctionCall functionCall = (FunctionCall) element;
      if (functionCall.isScopingConstruct()) {
        List<Symbol> vars = Lists.newArrayList();
        final LocalizationConstruct.ConstructType scopingConstruct = functionCall.getScopingConstruct();

        if (LocalizationConstruct.isFunctionLike(scopingConstruct)) {
          vars = MathematicaPsiUtilities.getLocalFunctionVariables(functionCall);
        }
View Full Code Here

Examples of de.halirutan.mathematica.parsing.psi.api.FunctionCall

   * @return <code >false</code> if the search can be stopped, <code >true</code> otherwise
   */
  @Override
  public boolean execute(@NotNull PsiElement element, ResolveState state) {
    if (element instanceof FunctionCall) {
      final FunctionCall functionCall = (FunctionCall) element;
      if (functionCall.isScopingConstruct()) {
        List<Symbol> vars = Lists.newArrayList();
        final LocalizationConstruct.ConstructType scopingConstruct = functionCall.getScopingConstruct();

        if (LocalizationConstruct.isFunctionLike(scopingConstruct)) {
          vars = MathematicaPsiUtilities.getLocalFunctionVariables(functionCall);
        }

View Full Code Here

Examples of org.apache.clerezza.rdf.core.sparql.query.FunctionCall

      s.append(")");
    } else if (e instanceof BuiltInCall) {
      BuiltInCall b = (BuiltInCall) e;
      appendCall(s, b.getName(), b.getArguements());
    } else if (e instanceof FunctionCall) {
      FunctionCall f = (FunctionCall) e;
      appendCall(s, f.getName().getUnicodeString(), f.getArguements());
    } else if (e instanceof LiteralExpression) {
      appendLiteralExpression(s, (LiteralExpression) e);
    } else if (e instanceof UriRefExpression) {
      s.append(((UriRefExpression) e).getUriRef().toString());
    }
View Full Code Here

Examples of org.apache.drill.common.expression.FunctionCall

      for (int i = 0; i < call.args.size(); ++i) {
        LogicalExpression newExpr = call.args.get(i).accept(this, null);
        args.add(newExpr);
      }

      return validateNewExpr(new FunctionCall(call.getDefinition(), args, call.getPosition()));
    }
View Full Code Here

Examples of org.apache.drill.common.expression.FunctionCall

        result = new TypedFieldId(Types.required(MinorType.BIGINT), -5);
      }
    };

   
    LogicalExpression functionCallExpr = new FunctionCall(FunctionDefinition.simple("testFunc",
        new ArgumentValidator() {
          @Override
          public void validateArguments(ExpressionPosition expr, List<LogicalExpression> expressions,
              ErrorCollector errors) {
            errors.addGeneralError(expr, "Error!");
          }

          @Override
          public String[] getArgumentNamesByPosition() {
            return new String[0];
          }
        }, OutputTypeDeterminer.FIXED_BIT), ImmutableList.of((LogicalExpression) //
            new FieldReference("test", ExpressionPosition.UNKNOWN) ), ExpressionPosition.UNKNOWN);
    LogicalExpression newExpr = ExpressionTreeMaterializer.materialize(functionCallExpr, batch, ec);
    assertTrue(newExpr instanceof FunctionCall);
    FunctionCall funcExpr = (FunctionCall) newExpr;
    assertEquals(1, funcExpr.args.size());
    assertEquals(bigIntType, funcExpr.args.get(0).getMajorType());
    assertEquals(1, ec.getErrorCount());
    System.out.println(ec.toErrorString());
  }
View Full Code Here

Examples of org.apache.drill.common.expression.FunctionCall

      g.setMappingSet(RIGHT_MAPPING);
      HoldingContainer right = g.addExpr(expr, false);
      g.setMappingSet(MAIN_MAPPING);
     
      // next we wrap the two comparison sides and add the expression block for the comparison.
      FunctionCall f = new FunctionCall(ComparatorFunctions.COMPARE_TO, ImmutableList.of((LogicalExpression) new HoldingContainerExpression(left), new HoldingContainerExpression(right)), ExpressionPosition.UNKNOWN);
      HoldingContainer out = g.addExpr(f, false);
      JConditional jc = g.getEvalBlock()._if(out.getValue().ne(JExpr.lit(0)));
     
      //TODO: is this the right order...
      if(od.getDirection() == Direction.ASC){
View Full Code Here

Examples of org.apache.drill.common.expression.FunctionCall

      cg.setMappingSet(IS_SAME_I1);
      HoldingContainer first = cg.addExpr(expr, false);
      cg.setMappingSet(IS_SAME_I2);
      HoldingContainer second = cg.addExpr(expr, false);
     
      FunctionCall f = new FunctionCall(ComparatorFunctions.COMPARE_TO, ImmutableList.of((LogicalExpression) new HoldingContainerExpression(first), new HoldingContainerExpression(second)), ExpressionPosition.UNKNOWN);
      HoldingContainer out = cg.addExpr(f, false);
      cg.getEvalBlock()._if(out.getValue().ne(JExpr.lit(0)))._then()._return(JExpr.FALSE);
    }
    cg.getEvalBlock()._return(JExpr.TRUE);
  }
View Full Code Here

Examples of org.apache.drill.common.expression.FunctionCall

      cg.setMappingSet(ISA_B1);
      HoldingContainer first = cg.addExpr(expr, false);
      cg.setMappingSet(ISA_B2);
      HoldingContainer second = cg.addExpr(expr, false);

      FunctionCall f = new FunctionCall(ComparatorFunctions.COMPARE_TO, ImmutableList.of((LogicalExpression) new HoldingContainerExpression(first), new HoldingContainerExpression(second)), ExpressionPosition.UNKNOWN);
      HoldingContainer out = cg.addExpr(f, false);
      cg.getEvalBlock()._if(out.getValue().ne(JExpr.lit(0)))._then()._return(JExpr.FALSE);
    }
    cg.getEvalBlock()._return(JExpr.TRUE);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.