regjsgen
Advanced tools
Comparing version 0.7.1 to 0.8.0
{ | ||
"name": "regjsgen", | ||
"version": "0.7.1", | ||
"version": "0.8.0", | ||
"description": "Generate regular expressions from regjsparser’s AST.", | ||
@@ -37,5 +37,5 @@ "homepage": "https://github.com/bnjmnt4n/regjsgen", | ||
"nyc": "^15.1.0", | ||
"regjsparser": "^0.8.2", | ||
"regjsparser": "^0.10.0", | ||
"request": "^2.88.2" | ||
} | ||
} |
@@ -33,4 +33,4 @@ # regjsgen [![Build status][ci-img]][ci] [![Code coverage status][codecov-img]][codecov] | ||
Tested in Node.js 10, 12, 14, and 16.<br> | ||
Compatible with regjsparser v0.7.0’s AST. | ||
Tested on Node.js 16 and 18.<br> | ||
Compatible with regjsparser v0.10.0’s AST. | ||
@@ -41,3 +41,3 @@ | ||
[codecov]: https://codecov.io/gh/bnjmnt4n/regjsgen | ||
[codecov-img]: https://codecov.io/gh/bnjmnt4n/regjsgen/branch/master/graph/badge.svg | ||
[codecov-img]: https://codecov.io/gh/bnjmnt4n/regjsgen/branch/main/graph/badge.svg | ||
[regjsparser]: https://github.com/jviereck/regjsparser |
/*! | ||
* regjsgen 0.5.2 | ||
* Copyright 2014-2020 Benjamin Tan <https://ofcr.se/> | ||
* Available under the MIT license <https://github.com/bnjmnt4n/regjsgen/blob/master/LICENSE-MIT.txt> | ||
* regjsgen 0.8.0 | ||
* Copyright 2014-2023 Benjamin Tan <https://ofcr.se/> | ||
* Available under the MIT license <https://github.com/bnjmnt4n/regjsgen/blob/main/LICENSE-MIT.txt> | ||
*/ | ||
@@ -239,3 +239,10 @@ ;(function() { | ||
case 'ignore': | ||
result += '?:'; | ||
if (node.modifierFlags) { | ||
result += '?'; | ||
if (node.modifierFlags.enabling) result += node.modifierFlags.enabling; | ||
if (node.modifierFlags.disabling) result += "-" + node.modifierFlags.disabling; | ||
result += ':'; | ||
} else { | ||
result += '?:'; | ||
} | ||
break; | ||
@@ -242,0 +249,0 @@ case 'lookahead': |
14986
342