Package com.github.sommeri.less4j.core.ast

Examples of com.github.sommeri.less4j.core.ast.BinaryExpression


    // this must represent a term. Otherwise we are doomed anyway.
    Expression head = (Expression) switchOn(members.removeFirst());
    while (!members.isEmpty()) {
      BinaryExpressionOperator operator = createBinaryOperator(members.removeFirst());
      if (members.isEmpty())
        return new BinaryExpression(parent, head, operator, null);

      Expression next = (Expression) switchOn(members.removeFirst());
      head = new BinaryExpression(parent, head, operator, next);
    }
    return head;
  }
View Full Code Here


  public boolean isRatioExpression(Expression expression) {
    if (!(expression instanceof BinaryExpression))
      return false;

    BinaryExpression composed = (BinaryExpression) expression;
    if (composed.getOperator().getOperator() != Operator.SOLIDUS) {
      return false;
    }

    if (composed.getLeft().getType() != ASTCssNodeType.NUMBER)
      return false;

    if (composed.getRight().getType() != ASTCssNodeType.NUMBER)
      return false;

    return true;
  }
View Full Code Here

TOP

Related Classes of com.github.sommeri.less4j.core.ast.BinaryExpression

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.