Classes
FootnoteClassifierMixin
2
▼
Mixin providing footnote definition classification.
FootnoteClassifierMixin
2
▼
Mixin providing footnote definition classification.
Methods
Internal Methods 2 ▼
_make_token
6
Token
▼
Create token with raw coordinates. Implemented by Lexer.
_make_token
6
Token
▼
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
_try_classify_footnote_def
3
Token | None
▼
Try to classify content as footnote definition.
Format: [^identifier]: content
_try_classify_footnote_def
3
Token | None
▼
def _try_classify_footnote_def(self, content: str, line_start: int, indent: int = 0) -> Token | None
Try to classify content as footnote definition.
Format: [^identifier]: content
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 | None
FOOTNOTE_DEF token if valid, None otherwise.
Token value format: identifier:content