Examples of astOperator()


Examples of lombok.ast.BinaryExpression.astOperator()

   
    @Override public void visitBinary(JCBinary node) {
      BinaryExpression expr = new BinaryExpression();
      expr.rawLeft(toTree(node.getLeftOperand()));
      expr.rawRight(toTree(node.getRightOperand()));
      expr.astOperator(JcTreeBuilder.BINARY_OPERATORS.inverse().get(getTag(node)));
      set(node, expr);
    }
   
    @Override public void visitNewClass(JCNewClass node) {
      ConstructorInvocation inv = new ConstructorInvocation();
View Full Code Here

Examples of lombok.ast.BinaryExpression.astOperator()

   
    @Override public void visitAssign(JCAssign node) {
      BinaryExpression expr = new BinaryExpression();
      expr.rawRight(toTree(node.getExpression()));
      expr.rawLeft(toTree(node.getVariable()));
      expr.astOperator(BinaryOperator.ASSIGN);
      set(node, expr);
    }
   
    @Override public void visitAssignop(JCAssignOp node) {
      BinaryExpression expr = new BinaryExpression();
View Full Code Here

Examples of lombok.ast.BinaryExpression.astOperator()

   
    @Override public void visitAssignop(JCAssignOp node) {
      BinaryExpression expr = new BinaryExpression();
      expr.rawRight(toTree(node.getExpression()));
      expr.rawLeft(toTree(node.getVariable()));
      expr.astOperator(JcTreeBuilder.BINARY_OPERATORS.inverse().get(getTag(node)));
      set(node, expr);
    }
   
    @Override public void visitExec(JCExpressionStatement node) {
      Node expr = toTree(node.getExpression());
View Full Code Here

Examples of lombok.ast.UnaryExpression.astOperator()

    }
   
    @Override public void visitUnary(JCUnary node) {
      UnaryExpression expr = new UnaryExpression();
      expr.rawOperand(toTree(node.getExpression()));
      expr.astOperator(JcTreeBuilder.UNARY_OPERATORS.inverse().get(getTag(node)));
      set(node, expr);
    }
   
    @Override public void visitBinary(JCBinary node) {
      BinaryExpression expr = new BinaryExpression();
View Full Code Here

Examples of lombok.ast.UnaryExpression.astOperator()

    } else {
      if (symbol != null) symbol = symbol.trim();
      if (!symbol.isEmpty()) {
        UnaryOperator op = UnaryOperator.fromSymbol(symbol, false);
        UnaryExpression expr = new UnaryExpression().rawOperand(operand);
        if (op != null) expr.astOperator(op);
        return posify(expr);
      }
    }
   
    return operand;
View Full Code Here

Examples of lombok.ast.UnaryExpression.astOperator()

        symbol = symbol.trim();
        if (symbol.isEmpty()) continue;
       
        UnaryOperator op = UnaryOperator.fromSymbol(symbol, false);
        UnaryExpression expr = new UnaryExpression().rawOperand(current);
        if (op != null) expr.astOperator(op);
        current = expr;
      }
     
      if (prev != null && !prev.getPosition().isUnplaced() && prev != current && current != null) {
        positionSpan(current, operator, operand);
View Full Code Here

Examples of lombok.ast.UnaryExpression.astOperator()

    assertFalse("raw value starts with -", n.rawValue().startsWith("-"));
    assertNotNull(n.getErrorReasonForValue());
   
    UnaryExpression unary = new UnaryExpression().astOperand(n);
    assertNotNull(n.getErrorReasonForValue());
    unary.astOperator(UnaryOperator.UNARY_MINUS);
    assertNull(n.getErrorReasonForValue());
    n.astParensPositions().add(Position.UNPLACED);
    assertNotNull(n.getErrorReasonForValue());
  }
 
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.