# thematic

URL: /patitas/api/lexer/classifiers/thematic/
Section: classifiers
Description: Thematic break classifier mixin.

---

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

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

Share with AI

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

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

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

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

Module

#
`lexer.classifiers.thematic`

Thematic break classifier mixin.

1Class

## Classes

`ThematicClassifierMixin`

2

▼

Mixin providing thematic break classification.

Mixin providing thematic break classification.

#### Methods

Internal Methods
2

▼

`_make_token`

6

`Token (/patitas/api/tokens/#Token)`

▼

Create token with raw coordinates. Implemented by Lexer.

`def _make_token(self, token_type: TokenType, value: str, start_pos: int, *, start_col: int | None = None, end_pos: int | None = None, line_indent: int = -1) -> Token`

##### Parameters

Name
Type
Description

`token_type`
`—`

`value`
`—`

`start_pos`
`—`

`start_col`
`—`

Default:`None`

`end_pos`
`—`

Default:`None`

`line_indent`
`—`

Default:`-1`

##### Returns

`Token (/patitas/api/tokens/#Token)`

`_try_classify_thematic_break`

3

`Token (/patitas/api/tokens/#Token) | None`

▼

Try to classify content as thematic break.

Thematic breaks are 3+ of the same …

`def _try_classify_thematic_break(self, content: str, line_start: int, indent: int = 0) -> Token | None`

Try to classify content as thematic break.

Thematic breaks are 3+ of the same character (-, *, _) with
optional spaces/tabs between them.

##### Parameters

Name
Type
Description

`content`
`—`

Line content with leading whitespace stripped

`line_start`
`—`

Position in source where line starts

`indent`
`—`

Number of leading spaces (for line_indent)

Default:`0`

##### Returns

`Token (/patitas/api/tokens/#Token) | None`

Token if valid break, None otherwise.
