|
|
|
@ -575,7 +575,7 @@ function generateBytecode(ast) {
|
|
|
|
|
regexp = '/^['
|
|
|
|
|
+ (node.inverted ? '^' : '')
|
|
|
|
|
+ node.parts.map(function(part) {
|
|
|
|
|
return part instanceof Array
|
|
|
|
|
return Array.isArray(part)
|
|
|
|
|
? js.regexpClassEscape(part[0])
|
|
|
|
|
+ '-'
|
|
|
|
|
+ js.regexpClassEscape(part[1])
|
|
|
|
@ -592,7 +592,7 @@ function generateBytecode(ast) {
|
|
|
|
|
|
|
|
|
|
parts = '['
|
|
|
|
|
+ node.parts.map(function(part) {
|
|
|
|
|
return part instanceof Array
|
|
|
|
|
return Array.isArray(part)
|
|
|
|
|
? '["' + js.stringEscape(part[0]) + '", "' + js.stringEscape(part[1]) + '"]'
|
|
|
|
|
: '"' + js.stringEscape(part) + '"';
|
|
|
|
|
}).join(', ')
|
|
|
|
|