pub trait ParserGroup:
Database
+ HasQueryGroup<ParserDatabase>
+ SyntaxGroup
+ Upcast<dyn SyntaxGroup>
+ FilesGroup {
// Required methods
fn priv_file_syntax_data(&self, file_id: FileId) -> SyntaxData;
fn file_syntax(&self, file_id: FileId) -> Maybe<SyntaxNode>;
fn file_module_syntax(&self, file_id: FileId) -> Maybe<SyntaxFile>;
fn file_expr_syntax(&self, file_id: FileId) -> Maybe<Expr>;
fn file_syntax_diagnostics(
&self,
file_id: FileId,
) -> Diagnostics<ParserDiagnostic>;
}
Required Methods§
sourcefn priv_file_syntax_data(&self, file_id: FileId) -> SyntaxData
fn priv_file_syntax_data(&self, file_id: FileId) -> SyntaxData
Should only be used internally. Parses a file and returns the result and the generated ParserDiagnostic.
sourcefn file_syntax(&self, file_id: FileId) -> Maybe<SyntaxNode>
fn file_syntax(&self, file_id: FileId) -> Maybe<SyntaxNode>
Parses a file and returns its SyntaxNode.
sourcefn file_module_syntax(&self, file_id: FileId) -> Maybe<SyntaxFile>
fn file_module_syntax(&self, file_id: FileId) -> Maybe<SyntaxFile>
Parses a file and returns its AST as a root SyntaxFile.
sourcefn file_expr_syntax(&self, file_id: FileId) -> Maybe<Expr>
fn file_expr_syntax(&self, file_id: FileId) -> Maybe<Expr>
Parses a file and returns its AST as an expression.
sourcefn file_syntax_diagnostics(
&self,
file_id: FileId,
) -> Diagnostics<ParserDiagnostic>
fn file_syntax_diagnostics( &self, file_id: FileId, ) -> Diagnostics<ParserDiagnostic>
Returns the parser diagnostics for this file.