]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/coffeescript.yaml
Improve new syntax files and fix a region glitch
[micro.git] / runtime / syntax / coffeescript.yaml
1 filetype: coffeescript
2
3 detect:
4     filename: "\\.coffee$"
5
6 rules:
7     - symbol.operator: "[!&|=/*+-<>]|\\b(and|or|is|isnt|not)\\b"
8     - identifier.class: "([A-Za-z_][A-Za-z0-9_]*:[[:space:]]*(->|\\()|->)"
9     - symbol.brackets: "[()]"
10     - statement:  "\\b(for|of|continue|break|isnt|null|unless|this|else|if|return)\\b"
11     - statement:  "\\b(try|catch|finally|throw|new|delete|typeof|in|instanceof)\\b"
12     - statement:  "\\b(debugger|switch|while|do|class|extends|super)\\b"
13     - statement:  "\\b(undefined|then|unless|until|loop|of|by|when)\\b"
14     - constant.bool:  "\\b(true|false|yes|no|on|off)\\b"
15     - identifier: "@[A-Za-z0-9_]*"
16
17     - constant.string:
18         start: "\""
19         end: "\""
20         rules:
21             - constant.specialChar: "\\\\."
22
23     - comment:
24         start: "#"
25         end: "$"
26         rules:
27             - todo: "(TODO|XXX|FIXME):?"