-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjavascript.nanorc
31 lines (30 loc) · 1.44 KB
/
javascript.nanorc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
syntax "JavaScript" "\.js$"
color blue "[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?"
color blue "[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
color blue "[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
color magenta "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
color cyan "(\b|^| )(in|with|set|if|get|do|for|while|const|return|break|case|continue|typeof|var|let|void|default|delete|else|this|undefined)(\b| |$)"
color cyan "(\b|^| )(new|set|if|get|do|for|while|case|typeof|void|else)(\b| |$|[(])"
color cyan "(\b|^| |=)(this)(\b| |$|[(.\[])"
color cyan "(\b|^| |=)(new)(\b| )"
color red "(\b|^| |[()\[{])(Array|Boolean|Date|Enumerator|Error|Function|Math|Number|Object|RegExp|String)(\b| |$|[(.])"
#color red "( |\.)[A-Z][a-z][A-Za-z_]*( |\.|\(|\[|\{)"
#color red "( |\.)[A-Z][a-z][A-Za-z_]*$"
#color red "^[A-Z][a-z][A-Za-z_]*$"
#color red "^[A-Z][a-z_][A-Za-z_]*(\s|\.|\(|\[|\{)"
color white ";|\{|\[|\."
#color ,red "\[|\]"
color brightcyan "(true|false|null)"
color green "/[^*]([^/]|(\\/))*[^\\]/[gim]*"
color green "\\[0-7][0-7]?[0-7]?|\\x[0-9a-fA-F]+|\\[bfnrt'"\?\\]"
color green "(^|[[:space:]])//.*"
color green "/\*.+\*/"
color white "\\\/"
color brightyellow "[\()]"
color brightwhite,cyan "TODO:?"
color ,green "[[:space:]]+$"
#color ,red " + +| + +"
color green "/\*.*"
color green start="/\*" end="\*/"
color brightred "(-|\+|\/|\*|=|<|>|\!|~|%|\?|:|&|\||;)"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'|(`|\})(\\.|[^`$]|$[^{])*(\$\{|`)"