Struct outline::parser::tex::TexParser

source ·
pub struct TexParser {
    pub code_environment: String,
    pub default_language: Option<String>,
    pub comment_start: String,
    pub interpolation_start: String,
    pub interpolation_end: String,
    pub macro_start: String,
    pub macro_end: String,
}
Expand description

The config for parsing a TeX document

Fields

code_environment: String

The environment used to indicate code.

Default: code

default_language: Option<String>

The language to set if there was no automatically detected language. Optional

comment_start: String

The sequence to identify a comment which should be omitted from the compiled code.

Default: //

interpolation_start: String

The sequence to identify the start of a meta variable interpolation.

Default: @{

interpolation_end: String

The sequence to identify the end of a meta variable interpolation.

Default: }

macro_start: String

The sequence to identify the start of a macro invocation.

Default: ==>

macro_end: String

The sequence to identify the end of a macro invocation.

Default: .

Implementations

Creates a default parser with a fallback language

Sets the default language of this parser (or does nothing if None is passed)

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Deserialize this value from the given Serde deserializer. Read more
The type of error for this parser
Parses the text part of the document. Should delegate the code section on a line-by-line basis to the built in code parser. Read more
Parses a macro name, returning the name and the extracted variables
Parses a line as code, returning the parsed Line object
The token to denote the start of a comment that should be rendered in the documentation. This may be specified as the actual line comment symbol used by the source language to exclude all comments from the transpiled file, or it can be a completely separate symbol to allow for some comments to be left untouched even in the output files. Read more
The token to denote the start of a meta-variable interpolation
The token to denote the end of a meta-variable interpolation
The token to denote the start of a macro invocation
The token to denote the end of a macro invocation
Prints a text block
Prints a code block
Fills a name with its placeholders
Prints a line of a code block

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.