Trait grit_util::Parser

source ·
pub trait Parser {
    type Tree: Ast;

    // Required methods
    fn parse_file(
        &mut self,
        body: &str,
        path: Option<&Path>,
        logs: &mut AnalysisLogs,
        new: bool
    ) -> Option<Self::Tree>;
    fn parse_snippet(
        &mut self,
        pre: &'static str,
        source: &str,
        post: &'static str
    ) -> SnippetTree<Self::Tree>;
}

Required Associated Types§

Required Methods§

source

fn parse_file( &mut self, body: &str, path: Option<&Path>, logs: &mut AnalysisLogs, new: bool ) -> Option<Self::Tree>

source

fn parse_snippet( &mut self, pre: &'static str, source: &str, post: &'static str ) -> SnippetTree<Self::Tree>

Implementors§