|
|
@@ -2,17 +2,17 @@
|
|
|
|
|
|
var KEYWORDS =
|
|
|
// keywords
|
|
|
- 'break,case,catch,continue,debugger,default,delete,do,else,false'
|
|
|
- + ',finally,for,function,if,in,instanceof,new,null,return,switch,this'
|
|
|
- + ',throw,true,try,typeof,var,void,while,with'
|
|
|
+ 'break,case,catch,continue,debugger,default,delete,do,else,false' +
|
|
|
+ ',finally,for,function,if,in,instanceof,new,null,return,switch,this' +
|
|
|
+ ',throw,true,try,typeof,var,void,while,with,undefined' +
|
|
|
// reserved
|
|
|
- + ',abstract,boolean,byte,char,class,const,double,enum,export,extends'
|
|
|
- + ',final,float,goto,implements,import,int,interface,long,native'
|
|
|
- + ',package,private,protected,public,short,static,super,synchronized'
|
|
|
- + ',throws,transient,volatile'
|
|
|
+ ',abstract,boolean,byte,char,class,const,double,enum,export,extends' +
|
|
|
+ ',final,float,goto,implements,import,int,interface,long,native' +
|
|
|
+ ',package,private,protected,public,short,static,super,synchronized' +
|
|
|
+ ',throws,transient,volatile' +
|
|
|
// ECMA 5 - use strict
|
|
|
- + ',arguments,let,yield'
|
|
|
- + ',undefined',
|
|
|
+ ',arguments,let,yield',
|
|
|
+
|
|
|
KEYWORDS_RE = new RegExp(["\\b" + KEYWORDS.replace(/,/g, '\\b|\\b') + "\\b"].join('|'), 'g'),
|
|
|
REMOVE_RE = /\/\*(?:.|\n)*?\*\/|\/\/[^\n]*\n|\/\/[^\n]*$|'[^']*'|"[^"]*"|[\s\t\n]*\.[\s\t\n]*[$\w\.]+/g,
|
|
|
SPLIT_RE = /[^\w$]+/g,
|