dashbitco / nimble_parsec

A simple and fast library for text-based parser combinators

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Customize doc of generated function?

inklesspen opened this issue · comments

I'd like to customize the doc of the entry function generated by defparsec, so I can include some examples of things it can and cannot parse. Is there a way to do this?

Hi @inklesspen! You can define a @doc clause before defparsec:

@doc "mydoc"
defparsec ...

We only use the default docs if none are provided. Also make sure you are on latest, as this feature was added at some point down the road.

Yeah, turned out I was on 0.4.0 for some reason. Thanks!