From b3e6eb74b22bd617cfdd74b34d70057e81096fd2 Mon Sep 17 00:00:00 2001 From: Martin Carlberg Date: Thu, 16 May 2013 12:07:44 +0200 Subject: [PATCH] Fixed: Reset all the macros when compiling a new file in the default implementation of the macro store. --- Objective-J/acorn.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Objective-J/acorn.js b/Objective-J/acorn.js index 1d1da740a..8eb0d89f1 100644 --- a/Objective-J/acorn.js +++ b/Objective-J/acorn.js @@ -135,7 +135,7 @@ if (typeof exports != "undefined" && !exports.acorn) { sourceFile = options.sourceFile || null; } - var macros = Object.create(null); + var macros; var macrosIsPredicate; function defaultAddMacro(macro) { @@ -607,6 +607,7 @@ if (typeof exports != "undefined" && !exports.acorn) { // Reset the token state. Used at the start of a parse. function initTokenState() { + macros = Object.create(null); tokCurLine = 1; tokPos = tokLineStart = 0; tokRegexpAllowed = true;