Add character set helpers

This commit is contained in:
Florian Schroedl
2022-08-26 18:45:31 +02:00
parent 178aeec565
commit b70c2f3519

View File

@@ -101,6 +101,10 @@ proc ch*(expectedChar: char): parserFnT {.inline.} =
let anyCh* = ch(AllChars)
let digit* = ch(Digits)
let letter* = ch(Letters)
let space* = ch(' ')
let whitespace* = ch(Whitespace)
let newline* = ch(Newlines)
proc str*(expectedString: string): parserFnT {.inline.} =
## Creates parser function with `expectedString`