Examples of OpAnd


Examples of org.springframework.expression.spel.ast.OpAnd

    SpelNodeImpl expr = eatRelationalExpression();
    while (peekIdentifierToken("and")) {
      Token t = nextToken();// consume 'AND'
      SpelNodeImpl rhExpr = eatRelationalExpression();
      checkRightOperand(t,rhExpr);
      expr = new OpAnd(toPos(t),expr,rhExpr);
    }
    return expr;
  }
View Full Code Here

Examples of org.springframework.expression.spel.ast.OpAnd

    SpelNodeImpl expr = eatRelationalExpression();
    while (peekIdentifierToken("and")) {
      Token t = nextToken();// consume 'AND'
      SpelNodeImpl rhExpr = eatRelationalExpression();
      checkRightOperand(t,rhExpr);
      expr = new OpAnd(toPos(t),expr,rhExpr);
    }
    return expr;
  }
View Full Code Here

Examples of org.springframework.expression.spel.ast.OpAnd

  @Test
  public void positionalInformation() throws EvaluationException, ParseException {
    SpelExpression expr = new SpelExpressionParser().parseRaw("true and true or false");
    SpelNode rootAst = expr.getAST();
    OpOr operatorOr = (OpOr) rootAst;
    OpAnd operatorAnd = (OpAnd) operatorOr.getLeftOperand();
    SpelNode rightOrOperand = operatorOr.getRightOperand();

    // check position for final 'false'
    assertEquals(17, rightOrOperand.getStartPosition());
    assertEquals(22, rightOrOperand.getEndPosition());

    // check position for first 'true'
    assertEquals(0, operatorAnd.getLeftOperand().getStartPosition());
    assertEquals(4, operatorAnd.getLeftOperand().getEndPosition());

    // check position for second 'true'
    assertEquals(9, operatorAnd.getRightOperand().getStartPosition());
    assertEquals(13, operatorAnd.getRightOperand().getEndPosition());

    // check position for OperatorAnd
    assertEquals(5, operatorAnd.getStartPosition());
    assertEquals(8, operatorAnd.getEndPosition());

    // check position for OperatorOr
    assertEquals(14, operatorOr.getStartPosition());
    assertEquals(16, operatorOr.getEndPosition());
  }
View Full Code Here

Examples of org.springframework.expression.spel.ast.OpAnd

    SpelNodeImpl expr = eatRelationalExpression();
    while (peekIdentifierToken("and")) {
      Token t = nextToken();// consume 'AND'
      SpelNodeImpl rhExpr = eatRelationalExpression();
      checkRightOperand(t,rhExpr);
      expr = new OpAnd(toPos(t),expr,rhExpr);
    }
    return expr;
  }
View Full Code Here

Examples of org.springframework.expression.spel.ast.OpAnd

    SpelNodeImpl expr = eatRelationalExpression();
    while (peekIdentifierToken("and") || peekToken(TokenKind.SYMBOLIC_AND)) {
      Token t = nextToken()// consume 'AND'
      SpelNodeImpl rhExpr = eatRelationalExpression();
      checkOperands(t, expr, rhExpr);
      expr = new OpAnd(toPos(t), expr, rhExpr);
    }
    return expr;
  }
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.