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§
Sourcefn parse(&self, key0: FileId) -> Parse<SourceFile>
fn parse(&self, key0: FileId) -> Parse<SourceFile>
Parses the file into the syntax tree.
Sourcefn ast_id_map(&self, key0: FileId) -> Arc<AstIdMap>
fn ast_id_map(&self, key0: FileId) -> Arc<AstIdMap>
Returns the top level AST items of a file