]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/javascript.yaml
Add converted syntax files
[micro.git] / runtime / syntax / javascript.yaml
1 filetype: javascript
2
3 detect: 
4     filename: "\\.js$"
5
6 rules:
7     - constant.number: "\\b[\\-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\\b"
8     - constant.number: "\\b[\\-+]?([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([EePp][+\\-]?[0-9]+)?[fFlL]?"
9     - constant.number: "\\b[\\-+]?([0-9]+[EePp][+\\-]?[0-9]+)[fFlL]?"
10     - identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
11     - statement: "\\b(break|case|catch|continue|default|delete|do|else|finally)\\b"
12     - statement: "\\b(for|function|get|if|in|instanceof|new|return|set|switch)\\b"
13     - statement: "\\b(switch|this|throw|try|typeof|var|void|while|with)\\b"
14     - constant.bool: "\\b(null|undefined|NaN)\\b"
15     - constant.bool: "\\b(true|false)\\b"
16     - type: "\\b(Array|Boolean|Date|Enumerator|Error|Function|Math)\\b"
17     - type: "\\b(Number|Object|RegExp|String)\\b"
18     - symbol.operator: "[\\-+/*=<>!~%?:&|]"
19     - constant: "/[^*]([^/]|(\\\\/))*[^\\\\]/[gim]*"
20     - constant: "\\\\[0-7][0-7]?[0-7]?|\\\\x[0-9a-fA-F]+|\\\\[bfnrt'\"\\?\\\\]"
21     - comment: "(^|[[:space:]])//.*"
22     - comment: "/\\*.+\\*/"
23     - todo: "TODO:?"
24     - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"