if (expect("]", DO_NOTHING, m)) { return null; }
return new CssTree.Attrib(pos(m), ident, op, value);
}
private CssTree.Pseudo parsePseudo() throws ParseException {
Mark m = tq.mark();
tq.expectToken(":");
Mark m2 = tq.mark();
if (isTolerant && tq.isEmpty()) { return null; }
Token<CssTokenType> t = tq.peek();
CssTree.CssExprAtom atom;
if (CssTokenType.FUNCTION == t.type) {
String fnName = unescape(t);
fnName = fnName.substring(0, fnName.length() - 1); // strip trailing (
tq.advance();
Mark m3 = tq.mark();
String argIdent = expectIdent();
if (argIdent == null) { return null; }
FilePosition pos3 = pos(m3);
CssTree.IdentLiteral lit = new CssTree.IdentLiteral(pos3, argIdent);
CssTree.Term term = new CssTree.Term(pos3, null, lit);