# list

URL: /patitas/api/lexer/classifiers/list/
Section: classifiers
Description: List marker classifier mixin.

---

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

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

Share with AI

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

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

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

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

Module

#
`lexer.classifiers.list`

List marker classifier mixin.

1Class

## Classes

`ListClassifierMixin`

4

▼

Mixin providing list marker classification.

Mixin providing list marker classification.

#### Methods

Internal Methods
4

▼

`_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)`

`_calc_indent`

1

`tuple[int, int]`

▼

Calculate indent level. Implemented by Lexer.

`def _calc_indent(self, line: str) -> tuple[int, int]`

##### Parameters

Name
Type
Description

`line`
`—`

##### Returns

`tuple[int, int]`

`_try_classify_list_marker`

3

`Iterator[Token (/patitas/api/tokens/#Token)] | None`

▼

Try to classify content as list item marker.

`def _try_classify_list_marker(self: LexerClassifierHost, content: str, line_start: int, indent: int = 0) -> Iterator[Token] | None`

##### Parameters

Name
Type
Description

`content`
`—`

`line_start`
`—`

`indent`
`—`

Default:`0`

##### Returns

`Iterator[Token (/patitas/api/tokens/#Token)] | None`

`_yield_list_marker_and_content`

4

`Iterator[Token (/patitas/api/tokens/#Token)]`

▼

Yield list marker token and optional content tokens.

Content after the marker …

`def _yield_list_marker_and_content(self: LexerClassifierHost, marker: str, remaining: str, line_start: int, indent: int = 0) -> Iterator[Token]`

Yield list marker token and optional content tokens.

Content after the marker is checked for block-level elements:

- Thematic breaks (* * *, - - -, etc.)

- Fenced code blocks

- Block quotes

- ATX headings

- Nested list markers

##### Parameters

Name
Type
Description

`marker`
`—`

`remaining`
`—`

`line_start`
`—`

`indent`
`—`

Default:`0`

##### Returns

`Iterator[Token (/patitas/api/tokens/#Token)]`
