Parser

Trait Parser 

Source
pub trait Parser {
    type Tree: Ast;

    // Required methods
    fn parse_file(
        &mut self,
        body: &str,
        path: Option<&Path>,
        logs: &mut AnalysisLogs,
        origin: FileOrigin<'_, Self::Tree>,
    ) -> 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, origin: FileOrigin<'_, Self::Tree>, ) -> Option<Self::Tree>

Source

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

Implementors§