ml_switcheroo.core.latex.parser¶

LaTeX DSL Parser.

Parses MIDL LaTeX macros into a LibCST Module representing a Python AST.

Classes¶

LatexParser

Parses LaTeX source code containing MIDL macros into a Python CST.

Module Contents¶

class ml_switcheroo.core.latex.parser.LatexParser(latex_source: str)[source]¶

Parses LaTeX source code containing MIDL macros into a Python CST.

source¶
parse() → libcst.Module[source]¶

Parses the internally stored LaTeX source string.

Returns:

A LibCST Module containing the synthesized Python class.

Return type:

cst.Module