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

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


    SupportsLogicalCondition result = new SupportsLogicalCondition(token, (SupportsCondition) switchOn(children.next()));
    while (children.hasNext()) {
      SupportsLogicalOperator logicalOperator = toSupportsLogicalOperator(children.next());
      if (!children.hasNext())
        throw new BugHappened(GRAMMAR_MISMATCH, token);
      SupportsCondition condition = (SupportsCondition) switchOn(children.next());
      result.addCondition(logicalOperator, condition);
    }
    return result;
  }
View Full Code Here


    token.pushHiddenToKids();
    Iterator<HiddenTokenAwareTree> children = token.getChildren().iterator();
    HiddenTokenAwareTree first = children.next();
    if (first.getType() == LessLexer.LPAREN) {
      SyntaxOnlyElement openingParentheses = toSyntaxOnlyElement(first);
      SupportsCondition condition = (SupportsCondition) switchOn(children.next());
      SyntaxOnlyElement closingParentheses = toSyntaxOnlyElement(children.next());

      SupportsConditionInParentheses result = new SupportsConditionInParentheses(token, openingParentheses, condition, closingParentheses);
      return result;
    } else if (first.getType() == LessLexer.IDENT) {
      //TODO: warning on wrong operator (anything that is not 'not')
      SyntaxOnlyElement negation = toSyntaxOnlyElement(first);
      SupportsCondition condition = (SupportsCondition) switchOn(children.next());

      SupportsConditionNegation result = new SupportsConditionNegation(token, negation, condition);
      return result;
    }
View Full Code Here

TOP

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

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.