Trait mun_hir::AstDatabase

source ·
pub trait AstDatabase: Database + HasQueryGroup<AstDatabaseStorage> + SourceDatabase {
    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§

Parses the file into the syntax tree.

Returns the top level AST items of a file

Implementors§