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);
}