Fixed: Reset all the macros when compiling a new file in the default implementation of the macro store.

This commit is contained in:
Martin Carlberg
2013-05-16 12:07:44 +02:00
parent 392aafb360
commit b3e6eb74b2
+2 -1
View File
@@ -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;