优化着色
parent
428261416c
commit
87c7877a81
|
@ -16,12 +16,12 @@ const IMPORT_2 = /import ([\w\W]*?) from (['"])([^'"]*?)\2/g
|
|||
const IMPORT_3 = /import\((['"])([^'"]*?)\1\)/g
|
||||
const KEYWOWRD1 =
|
||||
/\b(var|const|let|function|for|switch|with|if|else|export|import|assert|as|from|async|await|break|continue|return|class|extends|try|catch|throw|new|while|this|super|default|case|debugger|delete|do|goto|in|static|get|set|public|private|protected|package|typeof|void)\b/g
|
||||
const KEYWOWRD2 = /\s(=|-|\+|\/|\*|<|>|%)\s/g
|
||||
const KEYWOWRD2 = /\s(=|-|\+|\/|\*|<|<=|>|>=|%)\s/g
|
||||
const KEYWOWRD3 =
|
||||
/(\+\=|-=|\/=|\*=|--|\+\+|===|==|=>|\.\.\.|\.|\?\.|\?\?|&&|\|\|)/g
|
||||
/(\+=|-=|\/=|\*=|\?\?=|--|\+\+|===|==|!==|!=|=>|\.\.\.|\.|\?\.|\?\?|&&|\|\|)/g
|
||||
const BUILDIN1 = /\b(null|undefined|true|false|NaN|Infinity)\b/g
|
||||
const BUILDIN2 =
|
||||
/\b(Object|String|Array|Boolean|Number|Function|Promise|Map|Set|WeakMap|WeakSet|URL)\b/g
|
||||
/\b(Object|String|Array|Boolean|Number|Function|Promise|Proxy|Reflect|Map|Set|WeakMap|WeakSet|URL)\b/g
|
||||
const STR = /(['"`])(.*?)(?<!\\)\1/g
|
||||
const NUM = /\b(\d+)\b/g
|
||||
const FN = /([\.\s])((?!if|for)[a-zA-Z$_#][\da-zA-Z_]*)\s?(\(.*?\)?)/g
|
||||
|
|
Loading…
Reference in New Issue