# protocols

URL: /patitas/api/lexer/classifiers/protocols/
Section: classifiers
Description: Protocol defining the lexer classifier mixin contract.

The `Lexer` is composed from many classifier
mixins. Several classifiers dispatch to *sibling* classifiers (for example, a
list marker may be followed by an ATX heading, a fenced code block, or a nested
block quote). ty cannot resolve those cross-mixin calls through a bare ``self``,
so the cross-calling methods annotate ``self`` as ``LexerClassifierHost``.

The annotation is runtime-inert; it never changes behaviour.

---

> For a complete page index, fetch /patitas/llms.txt.

Open LLM text
(/patitas/api/lexer/classifiers/protocols/index.txt)

Share with AI

Ask Claude
(https://claude.ai/new?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fpatitas%2Fapi%2Flexer%2Fclassifiers%2Fprotocols%2Findex.txt)

Ask ChatGPT
(https://chatgpt.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fpatitas%2Fapi%2Flexer%2Fclassifiers%2Fprotocols%2Findex.txt)

Ask Gemini
(https://gemini.google.com/app?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fpatitas%2Fapi%2Flexer%2Fclassifiers%2Fprotocols%2Findex.txt)

Ask Copilot
(https://copilot.microsoft.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fpatitas%2Fapi%2Flexer%2Fclassifiers%2Fprotocols%2Findex.txt)

Module

#
`lexer.classifiers.protocols`

Protocol defining the lexer classifier mixin contract.

The`Lexer`is composed from many classifier
mixins. Several classifiers dispatch to sibling classifiers (for example, a
list marker may be followed by an ATX heading, a fenced code block, or a nested
block quote). ty cannot resolve those cross-mixin calls through a bare`self`,
so the cross-calling methods annotate`self` as `LexerClassifierHost`.

The annotation is runtime-inert; it never changes behaviour.

1Class

## Classes

`LexerClassifierHost`

0

▼

Structural contract for the composed Lexer used by classifier mixins.

Bases:

`Protocol`

Structural contract for the composed Lexer used by classifier mixins.
