[][src]Trait scdlang_smcat::Transpiler

pub trait Transpiler<'t>: Display {
    fn parse(&mut self, source: &str) -> Result<(), Box<dyn Error + 'static>>;
fn insert_parse(
        &mut self,
        source: &str
    ) -> Result<(), Box<dyn Error + 'static>>;
fn try_parse(
        source: &str,
        options: Scdlang<'t>
    ) -> Result<Self, Box<dyn Error + 'static>>;
fn configure(&mut self) -> &mut dyn Builder<'t>; fn flush_cache<'e>(&'t self) -> Result<(), Box<dyn Error + 'e>> { ... }
fn clean_cache<'e>(&'t self) -> Result<(), Box<dyn Error + 'e>> { ... } }

A Trait which external parser must implement.

This trait was mean to be used outside the core. For example, to build a transpiler.

Required methods

fn parse(&mut self, source: &str) -> Result<(), Box<dyn Error + 'static>>

Parse source then replace the results.

fn insert_parse(&mut self, source: &str) -> Result<(), Box<dyn Error + 'static>>

Parse source then insert/append the results.

fn try_parse(
    source: &str,
    options: Scdlang<'t>
) -> Result<Self, Box<dyn Error + 'static>>

Parse source while instantiate the Parser.

fn configure(&mut self) -> &mut dyn Builder<'t>

Configure the parser.

Loading content...

Provided methods

fn flush_cache<'e>(&'t self) -> Result<(), Box<dyn Error + 'e>>

Completely clear the caches which also deallocate the memory.

fn clean_cache<'e>(&'t self) -> Result<(), Box<dyn Error + 'e>>

Clear the caches while still retain the allocated memory.

Loading content...

Implementors

impl<'a> Parser<'a> for Machine<'a>[src]

Loading content...