mirror of
https://github.com/zyedidia/micro.git
synced 2024-10-27 12:37:38 +03:00
46 lines
1.4 KiB
YAML
46 lines
1.4 KiB
YAML
filetype: ocaml
|
|
|
|
detect:
|
|
filename: "\\.mli?$"
|
|
|
|
rules:
|
|
- identifier: "\\b[A-Z][0-9a-z_]{2,}\\b"
|
|
#declarations
|
|
- statement: "\\b(let|val|method|in|and|rec|private|virtual|constraint)\\b"
|
|
#structure items
|
|
- type: "\\b(type|open|class|module|exception|external)\\b"
|
|
#patterns
|
|
- statement: "\\b(fun|function|functor|match|try|with)\\b"
|
|
#patterns-modifiers
|
|
- statement: "\\b(as|when|of)\\b"
|
|
#conditions
|
|
- statement: "\\b(if|then|else)\\b"
|
|
#blocs
|
|
- type: "\\b(begin|end|object|struct|sig|for|while|do|done|to|downto)\\b"
|
|
#constantes
|
|
- constant.bool: "\\b(true|false)\\b"
|
|
#modules/classes
|
|
- special: "\\b(include|inherit|initializer)\\b"
|
|
#expr modifiers
|
|
- special: "\\b(new|ref|mutable|lazy|assert|raise)\\b"
|
|
- constant.string:
|
|
start: "'"
|
|
end: "'"
|
|
skip: "\\\\."
|
|
rules:
|
|
- constant.specialChar: "%."
|
|
- constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
|
|
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
|
|
- constant.string:
|
|
start: "\""
|
|
end: "\""
|
|
skip: "\\\\."
|
|
rules:
|
|
- constant.specialChar: "%."
|
|
- constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
|
|
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
|
|
- comment:
|
|
start: "\\(\\*"
|
|
end: "\\*\\)"
|
|
rules: []
|