vickenty / lang-c

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

Parse compound literals in expression context #28

Closed vickenty closed 4 years ago

vickenty commented 4 years ago

Parser mis-recognized typename part of a compound literal as a parenthesized expression. This caused it to leave postfix_expression1 rule too early, and then fail trying to parse { as an operator.

Making parser try compound_literal first fixes the problem.

Fixes #27