Skip to content

storing generators inside structs #39

@orhanbalci

Description

@orhanbalci

Hi there. Is it possible to store generators as a field of a struct? I try to implement a parser state machine using generators. I need to perform operations whenever a specific pattern is parsed through a ParserListener trait. In order to consume input I would like to control this generator using an outer struct. Here is the link to related code I wrote. https://github.com/orhanbalci/memterm/blob/e5e4ed04cf288fa1c9590250210312281b34c648/src/parser.rs#L19C27-L19C37

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions