Module

lexer.classifiers.quote

Block quote classifier mixin.

Classes

QuoteClassifierMixin 3
Mixin providing block quote classification.

Mixin providing block quote classification.

Methods

Internal Methods 3
_location_from 3 SourceLocation
Get source location from saved position. Implemented by Lexer.
def _location_from(self, start_pos: int, start_col: int | None = None, end_pos: int | None = None) -> SourceLocation
Parameters
Name Type Description
start_pos
start_col Default:None
end_pos Default:None
Returns
SourceLocation
_expand_tabs 2 str
Expand tabs. Implemented by Lexer.
def _expand_tabs(self, text: str, start_col: int = 1) -> str
Parameters
Name Type Description
text
start_col Default:1
Returns
str
_classify_block_quote 3 Iterator[Token]
Classify block quote marker and emit tokens.
def _classify_block_quote(self, content: str, line_start: int, indent: int = 0) -> Iterator[Token]
Parameters
Name Type Description
content

Content starting with >

line_start

Absolute offset of the start of the line

indent

Column position of the > marker (0-indexed)

Default:0
Returns
Iterator[Token]