fix use strict parsing
This commit is contained in:
parent
a0097e2ec8
commit
04e152ac77
@ -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