rusty-ecma / RESSA

Rusty EcmaScript Syntax Analyzer
MIT License
111 stars 14 forks source link

Parse error in Regex #67

Closed azw413 closed 2 years ago

azw413 commented 2 years ago

I found a parse error in the following line of code:

var DATE_FORMATS_SPLIT = /((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;

The error is Other(Error { msg: "numbers out of order in {3675569185,2395953488}", idx: 121 })

FreeMasen commented 2 years ago

This one is a pretty confusing one, I'll have to dig a little further on it. When I dump it into a test for res-regex it overflows the u32 so it seems like there are some issues for sure with the parsing (hopefully not the tokenizing)

FreeMasen commented 2 years ago

This should now be fixed, cargo update -p res-regex to get >= 0.1.4

azw413 commented 2 years ago

Thanks Robert ! I confirm that it can now parse that line.