shift-codegen
Advanced tools
Comparing version 7.0.1 to 7.0.2
@@ -776,3 +776,3 @@ 'use strict'; | ||
value: function reduceLiteralRegExpExpression(node) { | ||
return t('/' + node.pattern + '/' + (node.global ? 'g' : '') + (node.ignoreCase ? 'i' : '') + (node.multiLine ? 'm' : '') + (node.unicode ? 'u' : '') + (node.sticky ? 'y' : ''), true); | ||
return t('/' + node.pattern + '/' + (node.global ? 'g' : '') + (node.ignoreCase ? 'i' : '') + (node.multiLine ? 'm' : '') + (node.dotAll ? 's' : '') + (node.unicode ? 'u' : '') + (node.sticky ? 'y' : ''), true); | ||
} | ||
@@ -779,0 +779,0 @@ }, { |
@@ -70,4 +70,6 @@ 'use strict'; | ||
this.lastCodePoint = null; | ||
this.lastTokenStr = ''; | ||
this.optionalSemi = false; | ||
this.previousWasRegExp = false; | ||
this.partialHtmlComment = false; | ||
} | ||
@@ -91,2 +93,3 @@ | ||
this.result += tokenStr; | ||
this.lastTokenStr = tokenStr; | ||
} | ||
@@ -120,3 +123,4 @@ }, { | ||
this.previousWasRegExp = isRegExp; | ||
if (lastCodePoint && ((lastCodePoint === '+' || lastCodePoint === '-') && lastCodePoint === rightCodePoint || isIdentifierPartES6(lastCodePoint) && isIdentifierPartES6(rightCodePoint) || lastCodePoint === '/' && rightCodePoint === '/' || previousWasRegExp && rightCodePoint === 'i' || this.result.endsWith('<!') && tokenStr.startsWith('--'))) { | ||
if (lastCodePoint && ((lastCodePoint === '+' || lastCodePoint === '-') && lastCodePoint === rightCodePoint || isIdentifierPartES6(lastCodePoint) && isIdentifierPartES6(rightCodePoint) || lastCodePoint === '/' && rightCodePoint === '/' || previousWasRegExp && rightCodePoint === 'i' || this.partialHtmlComment && tokenStr.startsWith('--'))) { | ||
this.result += ' '; | ||
@@ -126,3 +130,6 @@ } | ||
this.partialHtmlComment = this.lastTokenStr.endsWith('<') && tokenStr === '!'; | ||
this.result += tokenStr; | ||
this.lastTokenStr = tokenStr; | ||
} | ||
@@ -129,0 +136,0 @@ }]); |
{ | ||
"name": "shift-codegen", | ||
"version": "7.0.1", | ||
"version": "7.0.2", | ||
"description": "code generator for Shift format ASTs", | ||
@@ -5,0 +5,0 @@ "author": "Shape Security", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
184650
3385