Crate rustla[][src]

ruSTLa is a Rust implementation of the rSTLa or resTructuredText → LaTeX transpiler. ruSTLa is a master’s thesis project of Santtu Söderholm, and is intended to function as the counterpart to the LarST, or LaTeX → reStructuredText parser, written by Tomi Janhunen.

Copyright © 2020 Santtu Söderholm

Modules

common

This submodule contains useful functions and other constructs that don’t sensibly belong to any specific entity in the program.

doctree

This module defines the document tree and its nodes. The implementation is in the form of a zipper: the DocTree is a container for the metadata (such as hyperlinks) related to the parsing of the tree and store the tree in the form a a TreeZipper in its field DocTree.tree. The TreeZipper type is specified in the submodule crate::parser::tree_zipper.

parser

This is the parser module of ruSTLa. It contains the Parser type and the state_machine submodule, that hosts the state transition functions of different states.

Enums

MainError

The ways in which the main function can fail.

Functions

run

Program starting point. Reads the input string, feeds it to the parser and prints the generated doctree.