parse

Utilities for parsing macros from source code.

macro_polo.parse.parse_macro_matcher(source)[source]

Parse a macro matcher from source code or a token stream.

Parameters:

source (str | Iterable[Token])

Return type:

MacroMatcher

macro_polo.parse.parse_macro_transcriber(source)[source]

Parse a macro transcriber from source code or a token stream.

Parameters:

source (str | Iterable[Token])

Return type:

MacroTranscriber