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.