[][src]Trait binjs::source::SourceParser

pub trait SourceParser<AST> {
    type Error: Debug;
    fn parse_str(&self, source: &str) -> Result<AST, Self::Error>;
fn parse_file<P: AsRef<Path>>(&self, path: P) -> Result<AST, Self::Error>; }

A source that can parse files to ASTs.

Associated Types

type Error: Debug

Loading content...

Required methods

fn parse_str(&self, source: &str) -> Result<AST, Self::Error>

Parse a string.

fn parse_file<P: AsRef<Path>>(&self, path: P) -> Result<AST, Self::Error>

Parse a file.

Loading content...

Implementors

impl SourceParser<Script> for Shift[src]

type Error = Error

fn parse_file<P: AsRef<Path>>(&self, path: P) -> Result<AST, Error>[src]

Parse a text source file, using Shift.

Loading content...