Search in sources :

Example 1 with ClassCondition

use of com.gargoylesoftware.css.parser.condition.ClassCondition in project LoboEvolution by LoboEvolution.

the class CSS3Parser method _class.

// 
// class
// : '.' IDENT
// ;
// 
public final Condition _class(boolean pseudoElementFound) throws ParseException {
    Token t;
    Locator locator;
    ParseException pe = null;
    try {
        if (pseudoElementFound) {
            pe = generateParseException();
        }
        jj_consume_token(DOT);
        locator = createLocator(token);
        t = jj_consume_token(IDENT);
        if (pseudoElementFound) {
            throw pe;
        }
        return new ClassCondition(unescape(t.image, false), locator);
    } catch (ParseException e) {
        throw toCSSParseException("invalidClassSelector", e);
    }
}
Also used : Locator(com.gargoylesoftware.css.parser.Locator) PseudoClassCondition(com.gargoylesoftware.css.parser.condition.PseudoClassCondition) ClassCondition(com.gargoylesoftware.css.parser.condition.ClassCondition) CSSParseException(com.gargoylesoftware.css.parser.CSSParseException)

Aggregations

CSSParseException (com.gargoylesoftware.css.parser.CSSParseException)1 Locator (com.gargoylesoftware.css.parser.Locator)1 ClassCondition (com.gargoylesoftware.css.parser.condition.ClassCondition)1 PseudoClassCondition (com.gargoylesoftware.css.parser.condition.PseudoClassCondition)1