m4rw3r / chomp

A fast monadic-style parser combinator designed to work on stable Rust.
Apache License 2.0
243 stars 19 forks source link

Wrap macro expansion in parentheses #48

Closed dashed closed 8 years ago

dashed commented 8 years ago

This is needed since there are changes to how macros are expanded on rust nightly which resulted in these errors:

<chomp macros>:5:59: 5:60 error: expected expression, found `.`
<chomp macros>:5 __parse_internal ! { @ EXPR ( $ input ; ) $ ( $ exp ) * } . bind (
                                                                           ^
<chomp macros>:9:59: 9:60 error: expected expression, found `.`
<chomp macros>:9 __parse_internal ! { @ EXPR ( $ input ; ) $ ( $ exp ) * } . bind (
                                                                           ^
<chomp macros>:5:59: 5:60 error: expected expression, found `.`
<chomp macros>:5 __parse_internal ! { @ EXPR ( $ input ; ) $ ( $ exp ) * } . bind (
                                                                           ^
<chomp macros>:9:59: 9:60 error: expected expression, found `.`
<chomp macros>:9 __parse_internal ! { @ EXPR ( $ input ; ) $ ( $ exp ) * } . bind (
                                                                           ^
<chomp macros>:9:59: 9:60 error: expected expression, found `.`
<chomp macros>:9 __parse_internal ! { @ EXPR ( $ input ; ) $ ( $ exp ) * } . bind (

See: https://github.com/rust-lang/rust/issues/34543#issuecomment-230934521

m4rw3r commented 8 years ago

Now present in the new version 0.2.6 (also on cargo now) along with a dependency fix for rustc 1.2.0. master is still intended to be 0.3.0, but work on the input-as-a-trait branch has been delayed.