lukaslueg / macro_railroad

A library to generate syntax diagrams for Rust macros.
MIT License
536 stars 11 forks source link

Parsing error when trying to parse the diesel table macro #13

Closed weiznich closed 6 years ago

weiznich commented 6 years ago

I've tried to paste the (internal) diesel table marco into the web demo. This fails with the following error:

Failed to parse, and I didn't even write an error-handler. Anyway:
ParseError(None)

The issue seems to be with the following rule:

macro_rules! __diesel_parse_table {
    // Found an import
    (
        tokens = [use $($import:tt)::+; $($rest:tt)*],
        imports = [$($imports:tt)*],
        $($args:tt)*
    ) => {
        __diesel_parse_table! {
            tokens = [$($rest)*],
            imports = [$($imports)* use $($import)::+;],
            $($args)*
        }
    };
}
dtolnay commented 6 years ago

Looks like a duplicate of #8.

lukaslueg commented 6 years ago

Will track this in #8

lukaslueg commented 6 years ago

Thanks for the report ;-)