]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/coffeescript.yaml
Add more syntax files and include syntax highlighter in the repo
[micro.git] / runtime / syntax / coffeescript.yaml
1 filetype: coffeescript
2
3 detect:
4     filename: "\\.coffee$"
5
6 rules:
7     - statement: "[!&|=/*+-<>]|\\b(and|or|is|isnt|not)\\b"
8     - identifier: "([A-Za-z_][A-Za-z0-9_]*:[[:space:]]*(->|\\()|->)"
9     - statement: "[()]"
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:  "\\b(true|false|yes|no|on|off)\\b"
15     - preproc: "@[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):?"