dtolnay / proc-macro-workshop

Learn to write Rust procedural macros  [Rust Latam conference, Montevideo Uruguay, March 2019]
Apache License 2.0
4.13k stars 1.04k forks source link

Seq05 would break multiple other tests. #60

Closed fatboyzz closed 1 year ago

fatboyzz commented 1 year ago

Seq05 introduced new rule to only repeat tokens inside #( ... )*. This new rule would cause other tests fall since they don't have their full body inside #( ... )*. Broken tests are Seq02, Seq03, Seq04, Seq08 .

dtolnay commented 1 year ago

You should implement this in a way that all those tests continue to pass.

fatboyzz commented 1 year ago

Thanks for your quick reply. Seems I have to do a pre scan of full seq body just to determine whether there is #(...)* inside it. Otherwise I can't tell if I should repeat the seq body at the beginning. I tend to think seq's syntax which allow implicit full body repeat is not a good design.

dtolnay commented 1 year ago

Okay!