Using Pest.rs, is there a better way to organize grammars in multiple files with an include or import?

419 Views Asked by At

Pest.rs makes it very easy to write grammars, but my current grammar in complex_conf.pest is 183 lines and growing. Is there an easy method to break this up such that the normal decorator macro show below,

#[derive(Parser)]
#[grammar = "complex_conf"]
pub struct ConfParser;

can still be made to work?

1

There are 1 best solutions below

0
On BEST ANSWER

I hesitate to answer, as I'm not the person to speak for the community here.

But it seems this is a known pain point which they're planning to fixing. Issue opened in 2018.