if (COLONLESS_PSEUDOELEMENTS.contains(t.getText().toLowerCase())) {
return createPseudoElement(token, 1, true);
}
if (children.size() == 2)
return new PseudoClass(token, children.get(1).getText());
if (children.size() == 3) {
HiddenTokenAwareTree parameter = children.get(2);
//FIXME: this is not really sufficient for all cases less.js supports (1@{num}n+3)
if (parameter.getType() == LessLexer.INTERPOLATED_VARIABLE)
return new PseudoClass(token, children.get(1).getText(), toInterpolabledVariable(parameter, parameter.getText()));
return new PseudoClass(token, children.get(1).getText(), switchOn(parameter));
}
throw new BugHappened(GRAMMAR_MISMATCH, token);
}