From eb8d7e679e1b5cf684b84fbebf8a13b54fdd566e Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 14 Jul 2015 17:14:32 +0100 Subject: [PATCH] fix use strict parsing --- packages/babylon/src/parseutil.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babylon/src/parseutil.js b/packages/babylon/src/parseutil.js index 1834724bdc..47af1b9b06 100755 --- a/packages/babylon/src/parseutil.js +++ b/packages/babylon/src/parseutil.js @@ -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