Trait TemplateCompiler

Source
pub trait TemplateCompiler<'a> {
    type IR;
    type Output;
    type Eh: ErrorHandler;
    type Conv: Converter<'a, IR = Self::IR>;
    type Trans: Transformer<IR = Self::IR>;
    type Gen: CodeGenerator<IR = Self::IR, Output = Self::Output>;

    // Required methods
    fn get_scanner(&self) -> Scanner;
    fn get_parser(&self) -> Parser;
    fn get_converter(&self) -> Self::Conv;
    fn get_transformer(&mut self) -> Self::Trans;
    fn get_code_generator(&mut self) -> Self::Gen;
    fn get_error_handler(&self) -> Self::Eh;

    // Provided method
    fn compile(&mut self, source: &'a str) -> Self::Output { ... }
}

Required Associated Types§

Source

type IR

Source

type Output

Source

type Eh: ErrorHandler

Source

type Conv: Converter<'a, IR = Self::IR>

Source

type Trans: Transformer<IR = Self::IR>

Source

type Gen: CodeGenerator<IR = Self::IR, Output = Self::Output>

Required Methods§

Source

fn get_scanner(&self) -> Scanner

Source

fn get_parser(&self) -> Parser

Source

fn get_converter(&self) -> Self::Conv

Source

fn get_transformer(&mut self) -> Self::Trans

Source

fn get_code_generator(&mut self) -> Self::Gen

Source

fn get_error_handler(&self) -> Self::Eh

Provided Methods§

Source

fn compile(&mut self, source: &'a str) -> Self::Output

Implementors§

Source§

impl<'a, 'b, Eh, W> TemplateCompiler<'a> for BaseCompiler<'a, 'b, Eh, W>
where W: Write, Eh: ErrorHandler + Clone + 'static,