transcribe¶
Macro transcription utilities.
- class macro_polo.transcribe.MacroTransciberSubstitution(name)[source]¶
A variable substitution in a transcriber.
- Parameters:
name (str)
- class macro_polo.transcribe.MacroTranscriber(*args)[source]¶
Transcribes a macro match to an output token stream.
- Parameters:
args (
MacroTranscriberItem)- Return type:
- macro_polo.transcribe.MacroTranscriberItem¶
Union of types that can appear in a
MacroTranscriber.alias of
Token|MacroTransciberSubstitution|MacroTranscriberRepeater
- class macro_polo.transcribe.MacroTranscriberRepeater(transcriber, sep=None)[source]¶
A repeated sub-transcriber.
- Parameters:
transcriber (MacroTranscriber)
sep (Token | None)
- transcribe(captures, repitition_path=())[source]¶
Transcribe the given match to an output token stream.
- transcriber: MacroTranscriber¶
The transcriber to repeat.