Trait AstDatabase

Source
pub trait AstDatabase:
    Database
    + HasQueryGroup<AstDatabaseStorage>
    + SourceDatabase {
    // Required methods
    fn parse(&self, key0: FileId) -> Parse<SourceFile>;
    fn ast_id_map(&self, key0: FileId) -> Arc<AstIdMap>;
}
Expand description

The AstDatabase provides queries that transform text from the SourceDatabase into an Abstract Syntax Tree (AST).

Required Methods§

Source

fn parse(&self, key0: FileId) -> Parse<SourceFile>

Parses the file into the syntax tree.

Source

fn ast_id_map(&self, key0: FileId) -> Arc<AstIdMap>

Returns the top level AST items of a file

Implementors§

Source§

impl<DB> AstDatabase for DB
where DB: SourceDatabase + Database + HasQueryGroup<AstDatabaseStorage>,