Skip to content

Handle bitflags #100

@eqrion

Description

@eqrion

It would be nice to be able to use bitflags! and have nice output generated. Ideally the output of macro expansion would just naturally work.

Currently the output of a bitflags! macro is a struct containing an integer, some trait implementations, and an inherent impl that contains the associated constants for each constant from the bitflags! macro.

I believe if we were to parse associated constants and some more trait implementations, the expanded output would work. The associated constants part is a little tricky because the constants are rust structs initializers and not integer literals.

Alternatively, we could parse the bitflags! macro and output some specially crafted output. This may be easier, but I'm not sure yet.

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