Document and test parser type internals

This commit is contained in:
Florian Schroedl
2022-08-26 20:05:54 +02:00
parent a64d9d7d9a
commit 4679cda441
2 changed files with 67 additions and 31 deletions

View File

@@ -189,7 +189,7 @@ proc anyUntil*(stopFn: parserFnT): parserFnT {.inline.} =
manyUntil(anyCh, stopFn)
proc choice*(parserFns: seq[parserFnT]): parserFnT {.inline} =
## Creates parser function that checks any of the `parserFns`.
## creates parser function that checks any of the `parserFns`.
## Needs one match for a `ParserResult.ok`.
return proc(parser: Parser): ParserResult {.closure.} =
var errors: seq[ParserResult] = newSeq[ParserResult]()