vickenty / lang-c

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

Fixed compound literals not working as normal expressions #22

Closed robbym closed 4 years ago

robbym commented 4 years ago

Fixes #21

vickenty commented 4 years ago

Thanks! The fix looks good, although I'm not sure about moving compound literal to primary expressions. Is it necessary? If possible, I'd prefer to keep the grammar close to the standard.

robbym commented 4 years ago

It's not necessary, I just thought that's where it would go if it was a primary expression. I'll take a look at the standard.

robbym commented 4 years ago

Apparently that was unnecessary! All that was needed was the conversion to initializer_list_item.

vickenty commented 4 years ago

Great job, thanks!