fix use strict parsing
This commit is contained in:
parent
e294b76a06
commit
eb8d7e679e
@ -10,7 +10,7 @@ const pp = Parser.prototype;
|
||||
|
||||
pp.isUseStrict = function (stmt) {
|
||||
return this.options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" &&
|
||||
stmt.expression.type === "Literal" && stmt.expression.value === "use strict";
|
||||
stmt.expression.type === "Literal" && stmt.expression.raw.slice(1, -1) === "use strict";
|
||||
};
|
||||
|
||||
// Predicate that tests whether the next token is of the given
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user