diff options
author | Adam Scarr <adam@vektah.net> | 2017-08-09 22:14:27 +1000 |
---|---|---|
committer | Adam Scarr <adam@vektah.net> | 2017-08-09 22:14:27 +1000 |
commit | b64fcfaa6115eb4a5f65c12d37f95d842136ae35 (patch) | |
tree | ceb8a55f3c538a263ab96563be7edec898518661 /parser.go | |
parent | d285a0badc988be2cef6e01d224bf8f108bb33bb (diff) |
Add a unicode whitespace parser
Diffstat (limited to 'parser.go')
-rw-r--r-- | parser.go | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -25,6 +25,9 @@ type Result struct { // - A parser that consumed some input should advance state.Pos type Parser func(*State) Result +// VoidParser is a special type of parser that never returns anything but can still consume input +type VoidParser func(*State) + // Parserish types are any type that can be turned into a Parser by Parsify // These currently include *Parser and string literals. // @@ -76,7 +79,7 @@ func ParsifyAll(parsers ...Parserish) []Parser { // WS will consume whitespace, it should only be needed when AutoWS is turned off func WS() Parser { return NewParser("AutoWS", func(ps *State) Result { - ps.WS() + ps.WS(ps) return Result{} }) } |