The token classes the highlighter colorizes.
A single highlightable span over the raw query string.
Result of highlighting a query: markup plus how the query is interpreted.
Splits a raw query into highlightable tokens that carry source offsets and, unlike the
parser's tokenize, preserve whitespace and the quote characters so the rendered markup
round-trips exactly to the input. Bare words matching OPERATOR_WORDS are tagged as
keyword; parens carry a nesting depth for rainbow coloring; unmatched parens and
unterminated quotes are flagged with error.
Highlights a search query for the search box, returning token-colored markup plus how the query is interpreted. The result mirrors parseSearchQuery's own grammar:
"plain" — no advanced syntax (rendered without coloring by the input component)."advanced" — a valid boolean query with at least one inclusive term."error" — advanced syntax that is malformed (e.g. unbalanced parens) or has no
inclusive constraint (only NOT/exclusions), which would match almost everything.
How a typed query is being interpreted, driving the search box's visual treatment.