private Boolean OnAfter(CssSelectorToken token) { if (token.Type != CssTokenType.RoundBracketClose || _nested._state != State.Data) { _nested.Apply(token); return(false); } return(true); }
protected override Boolean OnToken(CssSelectorToken token) { if (token.Type != CssTokenType.RoundBracketClose || _selector._state != State.Data) { _selector.Apply(token); return(false); } return(true); }
protected override Boolean OnToken(CssSelectorToken token) { if (token.Type != CssTokenType.RoundBracketClose || _nested._state != State.Data) { if (_firstToken && token.Type == CssTokenType.Delim) { // Roughly equivalent to inserting an implicit :scope _nested.Insert(ScopePseudoClassSelector.Instance); _nested.Apply(CssSelectorToken.Whitespace); _matchSiblings = true; } _firstToken = false; _nested.Apply(token); return(false); } return(true); }