Open mcandre opened 1 year ago
We should be able to use the peg::Parse trait for this.
https://docs.rs/peg/latest/peg/trait.Parse.html
Because this is a trait, then we may have to introduce lifetimes. Unsure whether to use for str
or for peg::Parse
when declaring the grammar.
So that we don't necessarily have to read the entire, potentially very large makefile, into memory all at once.
Also, using Read interfaces makes the code agnostic of whether the string comes from a fixture file vs a Rust string constant.
Assuming this is possible in peg.
https://docs.rs/peg/latest/peg/