Add type
This commit is contained in:
@@ -106,7 +106,7 @@ proc str*(expectedString: string): parserFnT {.inline.} =
|
|||||||
## Creates parser function with `expectedString`
|
## Creates parser function with `expectedString`
|
||||||
## When the parser has the string at the following index return `ParserResult.ok`
|
## When the parser has the string at the following index return `ParserResult.ok`
|
||||||
return proc(parser: Parser): ParserResult =
|
return proc(parser: Parser): ParserResult =
|
||||||
var res = parser.ok()
|
var res: ParserResult = parser.ok()
|
||||||
for c in expectedString.items:
|
for c in expectedString.items:
|
||||||
res = res.flatMap(ch(c))
|
res = res.flatMap(ch(c))
|
||||||
return res
|
return res
|
||||||
|
|||||||
Reference in New Issue
Block a user