Tighten up @const regex.

This commit is contained in:
Samuel Reed
2016-01-20 11:35:45 -06:00
parent 4a7179ff91
commit 1b703349cf
2 changed files with 26 additions and 2 deletions

View File

@@ -364,7 +364,7 @@ AST_Symbol.DEFMETHOD("global", function(){
AST_Var.DEFMETHOD("has_const_pragma", function() {
var comments_before = this.start && this.start.comments_before;
var lastComment = comments_before && comments_before[comments_before.length - 1];
return lastComment && /@const/.test(lastComment.value);
return lastComment && /@const\b/.test(lastComment.value);
});
AST_Toplevel.DEFMETHOD("_default_mangler_options", function(options){