kevinmehall / rust-peg

Parsing Expression Grammar (PEG) parser generator for Rust
https://crates.io/crates/peg
MIT License
1.46k stars 106 forks source link

cache_left_rec on rule ending in underscore #381

Open QnnOkabayashi opened 2 months ago

QnnOkabayashi commented 2 months ago

When you have a rule with #[cache_left_rec] and the rule name ends in an underscore (e.g. type_), you get a warning saying "Field type__cache should have a snake_case name". Since this is an implementation detail, I imagine that the macro should add #[allow(non_snake_case)] on the generated helper rule.