[−][src]Trait lark_parser::syntax::entity::LazyParsedEntity
Required methods
fn parse_children(
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<Seq<ParsedEntity>>
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<Seq<ParsedEntity>>
Parse the children of this entity.
Parameters
entity
: the entity id of selfdb
: the necessary bits/pieces of the parser database
fn parse_generic_declarations(
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<Result<Arc<GenericDeclarations>, ErrorReported>>
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<Result<Arc<GenericDeclarations>, ErrorReported>>
What "generic declarations" are on this entity? e.g., for
struct Foo<T> { .. }
, this would return the declaration for
T
.
fn parse_type(
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<Ty<Declaration>>
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<Ty<Declaration>>
What is the "declared type" of this entity? If the entity has
generic types, this type will include bound types referring to
those generics. e.g., for struct Foo<T> { .. }
, the result
would be effectively Foo<T>
.
fn parse_signature(
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<Result<Signature<Declaration>, ErrorReported>>
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<Result<Signature<Declaration>, ErrorReported>>
What is the "signature" of this entity?
fn parse_fn_body(
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<FnBody>
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<FnBody>
Parses the fn body associated with this entity, panicking if there is none.
Parameters
entity
: the entity id of selfdb
: the necessary bits/pieces of the parser database
Implementors
impl LazyParsedEntity for ParsedFile
[src]
fn parse_children(
&self,
_entity: Entity,
_db: &dyn LazyParsedEntityDatabase
) -> WithError<Seq<ParsedEntity>>
[src]
&self,
_entity: Entity,
_db: &dyn LazyParsedEntityDatabase
) -> WithError<Seq<ParsedEntity>>
fn parse_generic_declarations(
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<Result<Arc<GenericDeclarations>, ErrorReported>>
[src]
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<Result<Arc<GenericDeclarations>, ErrorReported>>
fn parse_type(
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<Ty<Declaration>>
[src]
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<Ty<Declaration>>
fn parse_signature(
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<Result<Signature<Declaration>, ErrorReported>>
[src]
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<Result<Signature<Declaration>, ErrorReported>>
fn parse_fn_body(
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<FnBody>
[src]
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<FnBody>
impl LazyParsedEntity for ParsedField
[src]
fn parse_children(
&self,
_entity: Entity,
_db: &dyn LazyParsedEntityDatabase
) -> WithError<Seq<ParsedEntity>>
[src]
&self,
_entity: Entity,
_db: &dyn LazyParsedEntityDatabase
) -> WithError<Seq<ParsedEntity>>
fn parse_generic_declarations(
&self,
_entity: Entity,
_db: &dyn LazyParsedEntityDatabase
) -> WithError<Result<Arc<GenericDeclarations>, ErrorReported>>
[src]
&self,
_entity: Entity,
_db: &dyn LazyParsedEntityDatabase
) -> WithError<Result<Arc<GenericDeclarations>, ErrorReported>>
fn parse_type(
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<Ty<Declaration>>
[src]
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<Ty<Declaration>>
fn parse_signature(
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<Result<Signature<Declaration>, ErrorReported>>
[src]
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<Result<Signature<Declaration>, ErrorReported>>
fn parse_fn_body(
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<FnBody>
[src]
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<FnBody>
impl LazyParsedEntity for ParsedMethod
[src]
fn parse_children(
&self,
_entity: Entity,
_db: &dyn LazyParsedEntityDatabase
) -> WithError<Seq<ParsedEntity>>
[src]
&self,
_entity: Entity,
_db: &dyn LazyParsedEntityDatabase
) -> WithError<Seq<ParsedEntity>>
fn parse_generic_declarations(
&self,
_entity: Entity,
_db: &dyn LazyParsedEntityDatabase
) -> WithError<Result<Arc<GenericDeclarations>, ErrorReported>>
[src]
&self,
_entity: Entity,
_db: &dyn LazyParsedEntityDatabase
) -> WithError<Result<Arc<GenericDeclarations>, ErrorReported>>
fn parse_type(
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<Ty<Declaration>>
[src]
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<Ty<Declaration>>
fn parse_signature(
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<Result<Signature<Declaration>, ErrorReported>>
[src]
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<Result<Signature<Declaration>, ErrorReported>>
fn parse_fn_body(
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<FnBody>
[src]
&self,
entity: Entity,
db: &dyn LazyParsedEntityDatabase
) -> WithError<FnBody>