pub trait AstDatabase: Database + HasQueryGroup<AstStorage> + InputDatabase {
    // Required methods
    fn ast(&self, key0: FileId) -> SyntaxTree;
    fn document(&self, key0: FileId) -> GreenNode;
    fn syntax_errors(&self) -> Vec<ApolloDiagnostic>;
}

Required Methods§

source

fn ast(&self, key0: FileId) -> SyntaxTree

Get an AST for a particular file. Returns a rowan SyntaxTree. The SyntaxTree can be safely shared between threads as it’s Send and Sync.

source

fn document(&self, key0: FileId) -> GreenNode

Get a file’s GraphQL Document. Returns a rowan Green Node. This is the top level document node that can be used when going between an SyntaxNodePtr to an actual SyntaxNode.

source

fn syntax_errors(&self) -> Vec<ApolloDiagnostic>

Get syntax errors found in the compiler’s manifest.

Implementors§

source§

impl<DB> AstDatabase for DBwhere DB: InputDatabase + Database + HasQueryGroup<AstStorage>,