Skip to main content

ParserState

Trait ParserState 

Source
pub trait ParserState<'a, Pos: StringPosition, T: FromLaTeXToken<'a, Pos>>: Sized {
    type Group: GroupState<'a, Pos, T, Self>;
    type MacroArg: Clone;

    // Provided methods
    fn from_comment(&self, r: StringRange<Pos>) -> Option<T> { ... }
    fn from_group(&self, r: StringRange<Pos>, children: Vec<T>) -> Option<T> { ... }
    fn from_math(
        &self,
        display: bool,
        r: StringRange<Pos>,
        children: Vec<T>,
    ) -> Option<T> { ... }
    fn from_control_sequence(&self, start: Pos, name: &'a str) -> Option<T> { ... }
    fn from_text(
        &self,
        r: StringRange<Pos>,
        text: &'a str,
        in_document: bool,
        in_math: bool,
        groups: &mut Groups<'a, '_, Pos, T, Self>,
    ) -> Option<T> { ... }
    fn from_macro_application(&self, m: Macro<'a, Pos>) -> Option<T> { ... }
    fn from_environment(&self, e: Environment<'a, Pos, T>) -> Option<T> { ... }
}

Required Associated Types§

Source

type Group: GroupState<'a, Pos, T, Self>

Source

type MacroArg: Clone

Provided Methods§

Source

fn from_comment(&self, r: StringRange<Pos>) -> Option<T>

Source

fn from_group(&self, r: StringRange<Pos>, children: Vec<T>) -> Option<T>

Source

fn from_math( &self, display: bool, r: StringRange<Pos>, children: Vec<T>, ) -> Option<T>

Source

fn from_control_sequence(&self, start: Pos, name: &'a str) -> Option<T>

Source

fn from_text( &self, r: StringRange<Pos>, text: &'a str, in_document: bool, in_math: bool, groups: &mut Groups<'a, '_, Pos, T, Self>, ) -> Option<T>

Source

fn from_macro_application(&self, m: Macro<'a, Pos>) -> Option<T>

Source

fn from_environment(&self, e: Environment<'a, Pos, T>) -> Option<T>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, Pos: StringPosition, T: FromLaTeXToken<'a, Pos>> ParserState<'a, Pos, T> for ()

Source§

type Group = Group<'a, Pos, T, ()>

Source§

type MacroArg = ()

Implementors§

Source§

impl<'a, MS: STeXModuleStore, Pos: StringPosition> ParserState<'a, Pos, STeXToken<Pos>> for STeXParseState<'a, Pos, MS>

Source§

type Group = STeXGroup<'a, MS, Pos>

Source§

type MacroArg = MacroArg<Pos>