mysticatea / regexpp

The regular expression parser for ECMAScript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Throw on explicit quantifier when min > max

conartist6 opened this issue · comments

This matches the behavior of builtin regex

Which API are you using? I think the following source code will throw the error correctly.

parseRegExpLiteral("/a{1,0}/")
// SyntaxError: Invalid regular expression: /a{1,0}/: numbers out of order in {} quantifier

To be honest I don't remember anymore. I sure didn't give very much information did I? Let's close this and I'll reopen if I ever figure out what specifically my problem was.