From 0665e6a2490c9ea770a98908788a1e5d210aa811 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Fri, 25 Aug 2023 10:17:21 +0530 Subject: feat: adds try expression for error handlign --- src/parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/parser.ts') diff --git a/src/parser.ts b/src/parser.ts index eeb9acf..216c1bc 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -142,7 +142,7 @@ export const parseDeclarations = (input: string) => ) export const parse = (input: string): Array => { - const res = P.many1(exprParser)(input.trim()) + const res = P.sepBy(exprParser, P.or([comma, whitespace]))(input.trim()) return match(res, { Ok: ({ value, input }) => { if (input) { -- cgit v1.3.1