/// <summary> /// Invoked once a square bracket has been found in the token enumerator. /// </summary> /// <param name="token">The token.</param> void OnAttributeOperator(CssToken token) { if (token.Type == CssTokenType.Whitespace) { return; } if (token.Type == CssTokenType.SquareBracketClose) { state = State.AttributeValue; OnAttributeEnd(token); } else if (token.IsMatchToken() || token.Type == CssTokenType.Delim) { state = State.AttributeValue; attrOp = token.ToValue(); if (attrOp == "|") { attrNs = attrName; attrName = null; attrOp = String.Empty; state = State.Attribute; } } else { state = State.AttributeEnd; valid = false; } }