Add character set helpers
This commit is contained in:
@@ -101,6 +101,10 @@ proc ch*(expectedChar: char): parserFnT {.inline.} =
|
|||||||
|
|
||||||
let anyCh* = ch(AllChars)
|
let anyCh* = ch(AllChars)
|
||||||
let digit* = ch(Digits)
|
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.} =
|
proc str*(expectedString: string): parserFnT {.inline.} =
|
||||||
## Creates parser function with `expectedString`
|
## Creates parser function with `expectedString`
|
||||||
|
|||||||
Reference in New Issue
Block a user