I wonder is it worth checking in Rustc to see if their Attributes structure cleans this up for you in the parser so you get a structure like: string attr_name bool has_rhs string get_rhs _Originally posted by @philberty in https://github.com/Rust-GCC/gccrs/pull/664#discussion_r706023945_