ptal / oak

A typed parser generator embedded in Rust code for Parsing Expression Grammars
Apache License 2.0
142 stars 14 forks source link

Accept extra arguments in the parsing function #10

Open ptal opened 10 years ago

ptal commented 10 years ago
peg! (
  grammar yag; // yet another grammar

  #[parsing_extra_arguments(env: &Environnement)]
  // ...
)

yag::parse(input, env);

The #[...] may not permit this style of arguments, a similar solution would be used.