Fix bug causing comments after 'use strict' to be handled twice

Closes #76
This commit is contained in:
Marijn Haverbeke
2013-11-11 11:25:59 +01:00
parent cb79f13d3d
commit dd456e3ad5
3 changed files with 9 additions and 2 deletions

View File

@@ -26956,3 +26956,10 @@ testFail("throw\n10;", "Illegal newline after throw (1:5)");
}
);
})();
(function() {
var comments = 0;
testAssert("\nfunction plop() {\n'use strict';\n/* Comment */\n}", function() {
if (comments != 1) return "Comment after strict counted twice.";
}, {onComment: function() {++comments;}});
})();