PoignardAzur / venial

"A very small syn"
MIT License
192 stars 9 forks source link

Fix parsing for `#![inner]` attributes followed by `#[outer]` ones #29

Closed Bromeon closed 2 years ago

Bromeon commented 2 years ago

The initial implementation from #28 cannot handle this:

impl MyTrait for MyStruct {
    #![inner]
    #[outer]
    pub type MyType = std::string::String;
}

This pull request fixes that, by first parsing all attributes of the form #![inner] and then #[outer].

The tests now also include such cases.