abnf_parsec icon indicating copy to clipboard operation
abnf_parsec copied to clipboard

Allow option to define generated functions as `defp`

Open lud opened this issue 10 months ago • 2 comments

I'm not sure this is already possible :)

It would be nice to be able to call the library like so:

use AbnfParsec,
  private: true

or something like that, so the using modules can build on top of the parser without making every function available.

What do you think?

lud avatar Apr 14 '25 21:04 lud

Probably just some change here to use defcombinatorp, iirc. https://github.com/princemaple/abnf_parsec/blob/main/lib%2Fabnf_parsec%2Fgenerator.ex#L69

princemaple avatar Apr 15 '25 13:04 princemaple

Alright I might give it a try later!

lud avatar Apr 16 '25 07:04 lud