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
_make_token 6 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
_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]