# modes

URL: /patitas/api/lexer/modes/
Section: lexer
Description: Lexer operating modes and constants.

This module defines the finite state machine modes for the lexer
and constant sets used for HTML block classification.

---

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

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

Share with AI

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

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

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

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

Module

#
`lexer.modes`

Lexer operating modes and constants.

This module defines the finite state machine modes for the lexer
and constant sets used for HTML block classification.

1Class

## Classes

`LexerMode`

0

▼

Lexer operating modes.

The lexer switches between modes based on context:
- BLOCK: Between blocks,…

Bases:

`Enum`

Lexer operating modes.

The lexer switches between modes based on context:

- BLOCK: Between blocks, scanning for block starts

- CODE_FENCE: Inside fenced code block

- DIRECTIVE: Inside directive block

- HTML_BLOCK: Inside HTML block (types 1-7)
