From 9d85ba8ae46e6568c55221dfe91923456a717bbf Mon Sep 17 00:00:00 2001 From: Florian Schroedl Date: Thu, 20 Jan 2022 17:00:00 +0100 Subject: [PATCH] Add index for choice --- src/parser/parser.nim | 1 + 1 file changed, 1 insertion(+) diff --git a/src/parser/parser.nim b/src/parser/parser.nim index f9606e7..2298eea 100644 --- a/src/parser/parser.nim +++ b/src/parser/parser.nim @@ -307,6 +307,7 @@ func choice*(parsers: seq[Parser -> ParserResult]): (Parser -> ParserResult) {.i let prettyErrors = errors.map((x: ParserResult) => x.error().expected) err(ParserError( kind: choiceMismatchErr, + index: parser.state.position + 1, expected: &"Choice ({prettyErrors})", unexpected: errors[0].error().unexpected, parser: parser,