Skip to content

Enums with Unit variants #37

@olaf-hochherz-work

Description

@olaf-hochherz-work

I tried to have an Enum that has variants that have no content. (in your terminology Unit)

#[derive(FromPest, Debug, Clone)]
#[pest_ast(rule(Rule::Formula))]
pub enum Formula {
    True,
    False,
}

I looked at the existing code and did not understand how it should work.

I have a commit that solves the issue for me.

c964345

Are you interested in a PR?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions