This commit is contained in:
Florian Schroedl
2022-08-26 16:46:49 +02:00
parent 1a4f665639
commit 9cdcef6d71

View File

@@ -106,7 +106,7 @@ proc str*(expectedString: string): parserFnT {.inline.} =
## Creates parser function with `expectedString`
## When the parser has the string at the following index return `ParserResult.ok`
return proc(parser: Parser): ParserResult =
var res = parser.ok()
var res: ParserResult = parser.ok()
for c in expectedString.items:
res = res.flatMap(ch(c))
return res