Don't make directive from parenthesized string.

This commit is contained in:
Jesse McCarthy 2015-12-28 09:58:21 -05:00
parent c5a8d4c5b0
commit b1da92e8cb

View File

@ -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);