Skip to content

Enums with Unit variants #37

Open
Open

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?

Activity

  1. tomtau commented on May 6, 2025

    @tomtau
    Contributor

    I have a commit that solves the issue for me.
    c964345
    Are you interested in a PR?

    would that be what's expected without that conversion?
    This was originally added in #35 by @TonyWu20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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