Skip to content

Commit 5547ee7

Browse files
committed
fix(parser): fix crash on improper negative BigIntLiterals, e.g. "42-"
1 parent d7b64a2 commit 5547ee7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/auth/templates/language/parse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const authenticationScriptParser = P.createLanguage({
8383
(__, literal) => literal
8484
).node('HexLiteral'),
8585
bigint: _ =>
86-
P.regexp(/[\-0-9]+/)
86+
P.regexp(/-?[0-9]+/)
8787
.desc('an integer literal')
8888
.map(BigInt)
8989
.node('BigIntLiteral')

0 commit comments

Comments
 (0)