aboutsummaryrefslogtreecommitdiff
path: root/src/parser/utils.ts
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/parser/utils.ts16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/parser/utils.ts b/src/parser/utils.ts
index 9e05286..841d77c 100644
--- a/src/parser/utils.ts
+++ b/src/parser/utils.ts
@@ -40,14 +40,16 @@ export const many0 = <T>(parser: Parser<T>): Parser<Array<T>> =>
)
export const many1 = <T>(parser: Parser<T>): Parser<Array<T>> =>
- recoverInput(flow(
- many0(parser),
- chain(([res, inp]) =>
- res.length > 0
- ? right([res, inp])
- : left([`many1 failed to parse at ${inp}`, inp]),
+ recoverInput(
+ flow(
+ many0(parser),
+ chain(([res, inp]) =>
+ res.length > 0
+ ? right([res, inp])
+ : left([`many1 failed to parse at ${inp}`, inp]),
+ ),
),
- ))
+ )
const recoverInput =
<T>(p: Parser<T>): Parser<T> =>