2017-03-21 21:55:22 +03:00
|
|
|
filetype: clojure
|
|
|
|
|
2017-03-21 22:07:39 +03:00
|
|
|
detect:
|
2017-11-14 21:58:28 +03:00
|
|
|
filename: "\\.(clj[sc]?)$"
|
2017-03-21 21:55:22 +03:00
|
|
|
|
|
|
|
rules:
|
2017-03-21 22:07:39 +03:00
|
|
|
|
|
|
|
# Constants
|
2017-03-21 21:55:22 +03:00
|
|
|
- constant.bool: "\\b(true|false)\\b"
|
|
|
|
- constant.macro: "\\b(nil)\\b"
|
2017-03-21 22:07:39 +03:00
|
|
|
# Valid numbers
|
2017-03-21 21:55:22 +03:00
|
|
|
- constant.number: "[\\-]?[0-9]+?\\b"
|
|
|
|
- constant.number: "0x[0-9][A-Fa-f]+?\\b"
|
|
|
|
- constant.number: "[\\-]?(3[0-6]|2[0-9]|1[0-9]|[2-9])r[0-9A-Z]+?\\b"
|
2017-03-21 22:07:39 +03:00
|
|
|
# Invalid numbers
|
2017-03-21 21:55:22 +03:00
|
|
|
- error: "[\\-]?([4-9][0-9]|3[7-9]|1|0)r[0-9A-Z]+?\\b"
|
2017-03-21 22:07:39 +03:00
|
|
|
|
|
|
|
# Symbols
|
2017-03-21 21:55:22 +03:00
|
|
|
- symbol.operator: "[=>+\\-*/'?]"
|
2017-03-21 22:07:39 +03:00
|
|
|
|
|
|
|
# Types/casting
|
2017-03-21 21:55:22 +03:00
|
|
|
- type: "\\b(byte|short|(big)?int(eger)?|long|float|num|bigdec|rationalize)\\b"
|
2017-03-21 22:07:39 +03:00
|
|
|
|
|
|
|
# String highlighting
|
|
|
|
- constant.string:
|
|
|
|
start: "\""
|
2017-03-28 03:53:08 +03:00
|
|
|
end: "\""
|
2017-03-29 16:45:16 +03:00
|
|
|
skip: "\\\\."
|
2017-03-21 22:07:39 +03:00
|
|
|
rules:
|
|
|
|
- constant.specialChar: "(\\\\u[0-9A-fa-f]{4,4}|\\\\newline|\\\\space|\\\\tab|\\\\formfeed|\\\\backspace|\\\\return|\\\\.)"
|
|
|
|
|
|
|
|
# Comments
|
|
|
|
- comment:
|
|
|
|
start: ";"
|
|
|
|
end: "$"
|
|
|
|
rules:
|
|
|
|
- todo: "(TODO|XXX|FIXME):?"
|
2017-03-23 02:03:06 +03:00
|
|
|
|