Add plus function
This commit is contained in:
@@ -348,8 +348,7 @@ when isMainModule:
|
||||
let testSentenceStr = "This is a sentence\n\nFollowing another sentence."
|
||||
let testSentenceParser = initParserResult(testSentenceStr)
|
||||
|
||||
let testSentence1 = following(@[anyUntil(newline), newline, newlineOrEol ]) +
|
||||
manyUntil(choice(@[letter, whitespace]), ch('.')) + ch('.') +
|
||||
newlineOrEol
|
||||
let testSentence1 = following(@[anyUntil(newline), newline, newlineOrEol])
|
||||
.plus(manyUntil(choice(@[letter, whitespace]), ch('.')) + ch('.') + newlineOrEol)
|
||||
|
||||
assert testSentenceParser.flatMap(testSentence1).tokensToString() == testSentenceStr
|
||||
|
||||
Reference in New Issue
Block a user