Don't make directive from parenthesized string.
This commit is contained in:
parent
c5a8d4c5b0
commit
b1da92e8cb
@ -460,7 +460,8 @@ pp.parseBlockBody = function (node, allowDirectives, topLevel, end) {
|
||||
let stmt = this.parseStatement(true, topLevel);
|
||||
|
||||
if (allowDirectives && !parsedNonDirective &&
|
||||
stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral") {
|
||||
stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" &&
|
||||
!stmt.expression.extra.parenthesized) {
|
||||
let directive = this.stmtToDirective(stmt);
|
||||
node.directives.push(directive);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user