mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-13 23:11:41 +00:00
Harden regexp parsing a bit
This commit is contained in:
@ -16,3 +16,15 @@ b/ig;
|
||||
|
||||
// just a comment
|
||||
//ig;
|
||||
|
||||
// duplicate flags
|
||||
|
||||
/(abc)\//iig;
|
||||
|
||||
// invalid flags
|
||||
|
||||
/(abc)\//iX;
|
||||
|
||||
// surrounding AST remains intact
|
||||
|
||||
false && /abc/gX.test(someString) || true;
|
||||
|
Reference in New Issue
Block a user