mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 04:41:21 +03:00
0e1d45dc36
Also, trim some whitespace and group one rule better. Also, fix a stray closing parenthesis in the JSON syntax, and add the missing slash to the possible escaped characters. (Reference: https://www.json.org/json-en.html.) Also, improve the ending of multiline strings in the Rust syntax.
31 lines
831 B
Plaintext
31 lines
831 B
Plaintext
## Syntax highlighting for OCaml.
|
|
|
|
syntax ocaml "\.mli?$"
|
|
magic "OCaml"
|
|
comment "(*|*)"
|
|
|
|
# Uid:
|
|
color red "\<[A-Z][0-9a-z_]{2,}\>"
|
|
# Declarations:
|
|
color green "\<(let|val|method|in|and|rec|private|virtual|constraint)\>"
|
|
# Structure items:
|
|
color red "\<(type|open|class|module|exception|external)\>"
|
|
# Patterns:
|
|
color blue "\<(fun|function|functor|match|try|with)\>"
|
|
# Pattern modifiers:
|
|
color yellow "\<(as|when|of)\>"
|
|
# Conditions:
|
|
color cyan "\<(if|then|else)\>"
|
|
# Blocks:
|
|
color magenta "\<(begin|end|object|struct|sig|for|while|do|done|to|downto)\>"
|
|
# Constants:
|
|
color green "\<(true|false)\>"
|
|
# Modules/classes:
|
|
color green "\<(include|inherit|initializer)\>"
|
|
# Expression modifiers:
|
|
color yellow "\<(new|ref|mutable|lazy|assert|raise)\>"
|
|
# Comments:
|
|
color white start="\(\*" end="\*\)"
|
|
# Strings:
|
|
color brightblack ""[^"\]*""
|