diff --git a/src/Parser/Interface.md b/src/Parser/Interface.md index d9c2db2..49fe300 100644 --- a/src/Parser/Interface.md +++ b/src/Parser/Interface.md @@ -283,10 +283,14 @@ delimited before after x = do pnote "Parsing delimited by \{show before} \{show after}" starting_state <- save _ <- parseExactChar before - val <- x + Right val <- tryEither x + | Left err => do + load starting_state + throw err Just _ <- tryMaybe $ parseExactChar after - | _ => throw $ - MkParseError starting_state "Unmatched delimiter \{show before}" + | _ => do + load starting_state + throw $ MkParseError starting_state "Unmatched delimiter \{show before}" pure val ```