forked from richrad/nanorc-mac
-
Notifications
You must be signed in to change notification settings - Fork 0
/
javascript.nanorc
18 lines (17 loc) · 863 Bytes
/
javascript.nanorc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
syntax "JavaScript" "\.js$"
NUMBER: "\<[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\>"
NUMBER: "\<[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
NUMBER: "\<[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
KEYWORD: "\<(break|case|catch|continue|default|delete|do|else|finally)\>"
KEYWORD: "\<(for|function|get|if|in|instanceof|new|return|set|switch)\>"
KEYWORD: "\<(switch|this|throw|try|typeof|var|void|while|with)\>"
KEYWORD: "\<(true|false|null|undefined|NaN)\>"
TYPE: "\<(Array|Boolean|Date|Enumerator|Error|Function|Math)\>"
TYPE: "\<(Number|Object|RegExp|String)\>"
OPERATOR: "[-+/*=<>!~%?:&|]"
REGEXP: "/[^*]([^/]|(\\/))*[^\\]/[gim]*"
STRING: "L?\"(\\"|[^"])*\"" "L?'(\'|[^'])*'"
ESCAPE: "\\[0-7][0-7]?[0-7]?|\\x[0-9a-fA-F]+|\\[bfnrt'"\?\\]"
COMMENT: start="/\*" end="\*/"
COMMENT: "(^|\s)//.*$"
+LINT