[][src]Trait lark_parser::syntax::entity::LazyParsedEntityDatabase

pub trait LazyParsedEntityDatabase: AsRef<GlobalIdentifierTables> + AsRef<EntityTables> + AsRef<DeclarationTables> {
    fn resolve_name(
        &self,
        item_entity: Entity,
        name: GlobalIdentifier
    ) -> Option<Entity>;
fn file_text(&self, id: FileName) -> Text;
fn file_tokens(
        &self,
        id: FileName
    ) -> WithError<Seq<Spanned<LexToken, FileName>>>;
fn generic_declarations(
        &self,
        entity: Entity
    ) -> WithError<Result<Arc<GenericDeclarations>, ErrorReported>>;
fn ty(&self, key: Entity) -> WithError<Ty<Declaration>>; }

The trait given to the LazyParsedEntity methods. It is a "dyn capable" variant of ParserDatabase.

Required methods

fn resolve_name(
    &self,
    item_entity: Entity,
    name: GlobalIdentifier
) -> Option<Entity>

Looks up a name name to see if it matches any entities in the scope of item_entity.

fn file_text(&self, id: FileName) -> Text

The file_text query

fn file_tokens(
    &self,
    id: FileName
) -> WithError<Seq<Spanned<LexToken, FileName>>>

The file_tokens query

fn generic_declarations(
    &self,
    entity: Entity
) -> WithError<Result<Arc<GenericDeclarations>, ErrorReported>>

The generic_declarations query

fn ty(&self, key: Entity) -> WithError<Ty<Declaration>>

The ty query

Loading content...

Implementors

impl<T: ParserDatabase> LazyParsedEntityDatabase for T[src]

Loading content...