micro/runtime/syntax/coffeescript.yaml

46 lines
1.4 KiB
YAML
Raw Permalink Normal View History

filetype: coffeescript
detect:
filename: "\\.coffee$"
rules:
- symbol.operator: "[!&|=/*+-<>]|\\b(and|or|is|isnt|not)\\b"
- identifier.class: "([A-Za-z_][A-Za-z0-9_]*:[[:space:]]*(->|\\()|->)"
2017-03-21 21:55:22 +03:00
- symbol.brackets: "[()]"
- statement: "\\b(for|of|continue|break|isnt|null|unless|this|else|if|return)\\b"
- statement: "\\b(try|catch|finally|throw|new|delete|typeof|in|instanceof)\\b"
- statement: "\\b(debugger|switch|while|do|class|extends|super)\\b"
- statement: "\\b(undefined|then|unless|until|loop|of|by|when)\\b"
- constant.bool: "\\b(true|false|yes|no|on|off)\\b"
- constant.number: "\\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\\b"
- constant.number: "\\b[-+]?([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
- constant.number: "\\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
2017-03-21 21:55:22 +03:00
- identifier: "@[A-Za-z0-9_]*"
- constant.string:
start: "\""
end: "\""
2017-03-29 16:45:16 +03:00
skip: "\\\\."
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "'"
end: "'"
skip: "\\\\."
rules:
- constant.specialChar: "\\\\."
- comment:
start: "#"
end: "$"
rules:
- todo: "(TODO|XXX|FIXME):?"
- comment:
start: "###"
end: "###"
rules:
- todo: "(TODO|XXX|FIXME)"