Ejemplo n.º 1
0
 private void appendSimpleSelectorHead(SimpleSelector selector) {
   cssOnly.ensureSeparator();
   if (!selector.isStar() || !selector.isEmptyForm()) {
     InterpolableName elementName = selector.getElementName();
     cssAndSM.appendIgnoreNull(elementName.getName(), elementName.getUnderlyingStructure());
   }
 }
Ejemplo n.º 2
0
  private boolean isEmptySelector(Selector selector) {
    if (selector.isCombined()) return false;

    SelectorPart head = selector.getHead();
    if (head.getType() != ASTCssNodeType.SIMPLE_SELECTOR) return false;

    SimpleSelector simpleHead = (SimpleSelector) head;
    if (!simpleHead.isEmptyForm() || !simpleHead.isStar()) {
      return false;
    }

    if (simpleHead.hasSubsequent()) return false;

    return true;
  }