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

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


      problemsHandler.warnExtendInsideExtend(selector);
    }

    SelectorPart lastPart = selector.getLastPart();
    if (lastPart == null || !(lastPart instanceof SimpleSelector))
      return new Extend(token, selector);

    SimpleSelector possibleAll = (SimpleSelector) lastPart;
    if (possibleAll.hasSubsequent() || !possibleAll.hasElement())
      return new Extend(token, selector);

    if (!EXTEND_ALL_KEYWORD.equals(possibleAll.getElementName().getName()))
      return new Extend(token, selector);

    if (AstLogic.hasNonSpaceCombinator(possibleAll)) {
      possibleAll.setElementName(null);
    } else {
      selector.getParts().remove(possibleAll);
    }
    return new Extend(token, selector, true);
  }
View Full Code Here


  }

  private void addPart(Selector selector, SelectorPart part) {
    ElementSubsequent lastSubsequent = part.getLastSubsequent();
    while (lastSubsequent!=null && isExtends(lastSubsequent)) {
      Extend extend = convertToExtend((PseudoClass) lastSubsequent);
      selector.addExtend(extend);
      part.removeSubsequent(lastSubsequent);
      lastSubsequent = part.getLastSubsequent();
    }
   
View Full Code Here

  private List<Extend> collectDirectExtendDeclarations(RuleSet ruleset) {
    List<Extend> result = new ArrayList<Extend>();
    List<ASTCssNode> members = new ArrayList<ASTCssNode>(ruleset.getBody().getMembers());
    for (ASTCssNode node : members) {
      if (node.getType()==ASTCssNodeType.EXTEND) {
        Extend extend = (Extend) node;
        manipulator.removeFromBody(extend);
        result.add(extend);
      }
    }
    return result;
View Full Code Here

TOP

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

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.