vickenty / lang-c

Lightweight C parser for Rust
Apache License 2.0
202 stars 30 forks source link

Support attributes on enum values #40

Closed kelnos closed 1 year ago

kelnos commented 1 year ago

GCC appears to support __attribute__ on enum values, e.g.

enum {
    SOME_THING = 0,
    OTHER_THING = 1,
    OLD_THING __attribute__(deprecated) = 2,
};

Found this trying to parse a .c file that uses glib, and got a SyntaxError.

vickenty commented 1 year ago

Thank you!