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

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


      inside.getElementName().setParent(null);
    inside.setElementName(null);
    List<ElementSubsequent> lfSubsequent = cutOff.getSubsequent();
    List<ElementSubsequent> insideSubsequent = inside.getSubsequent();
    MatchMarker<ElementSubsequent> match = listsComparator.prefixMatches(lfSubsequent, insideSubsequent, elementSubsequentComparator);
    SimpleSelector result = removeMatch(inside, insideSubsequent, match);
    //check if the whole thing was eaten up - we know that subsequent elements are always compared in whole
    return isEmpty(result) ? null : result;
  }
View Full Code Here


      result.add(inside);
      for (MatchMarker<ElementSubsequent> current : matches)
        if (current.isIn(subsequents)) {
          List<ElementSubsequent> tail = splitAfter(current.getLast(), subsequents);
          removeMatch(inside, subsequents, current);
          SimpleSelector second = createNoElementSelector(underlying, tail);
          result.add(second);
          subsequents = second.getSubsequent();
        }

      return result.toArray(new SimpleSelector[0]);
    } else {
      //lookFor starts by a star or by element name - lookFor must me prefix
View Full Code Here

      return new SimpleSelector[] { null, cutPrefix(lookFor, inside) };
    }
  }

  private SimpleSelector createNoElementSelector(HiddenTokenAwareTree underlying, SelectorCombinator combinator) {
    SimpleSelector second = createEmptySelector(underlying);
    second.setLeadingCombinator(combinator);
    second.configureParentToAllChilds();
    return second;
  }
View Full Code Here

    second.configureParentToAllChilds();
    return second;
  }

  private SimpleSelector createNoElementSelector(HiddenTokenAwareTree underlying, List<ElementSubsequent> tail) {
    SimpleSelector second = createEmptySelector(underlying);
    second.addSubsequent(tail);
    second.configureParentToAllChilds();
    return second;
  }
View Full Code Here

    second.configureParentToAllChilds();
    return second;
  }

  private SimpleSelector createEmptySelector(HiddenTokenAwareTree underlying) {
    SimpleSelector second = new SimpleSelector(underlying, null, null, true);
    second.setEmptyForm(true);
    return second;
  }
View Full Code Here

TOP

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

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.