-
Notifications
You must be signed in to change notification settings - Fork 0
/
ocaml.yaml
54 lines (39 loc) · 1.5 KB
/
ocaml.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
filetype: Ocaml
detect:
filename: "\\.ml$"
rules:
- type: "\\b(?i:(int|float|bool|char|string|unit))\\b"
- statement: "\\b(and|as|asr|begin|class|closed|constraint|do|done)\\b"
- statement: "\\b(downto|else|end|exception|external|failwith|false)\\b"
- statement: "\\b(flush|for|fun|function|functor|if|in|include)\\b"
- statement: "\\b(inherit|incr|land|let|load|los|lsl|lsr|lxor)\\b"
- statement: "\\b(match|method|mod|module|mutable|new|not|of|open)\\b"
- statement: "\\b(option|or|parser|private|ref|rec|raise|regexp|sig)\\b"
- statement: "\\b(struct|stdout|stdin|stderr|then|to|true|try|type)\\b"
- statement: "\\b(val|virtual|when|while|with)\\b"
- special: "\\b(let|rec|function|in)\\b"
# Various symbols ?? does it work?
# - symbol: "(\\||@|!|:|_|~|=|\\\\|;|\\(\\)|||\\[|\\]|\\{|\\})"
- symbol: "(\\||@|!|:|::|_|~|=|\\\\|;|\\(\\)|||\\[|\\]|\\{|\\})"
# Operators
# - symbol.operator: "(==|/=|&&|\\|\\||<|>|<=|>=)"
- symbol.operator: "(<|>|<=|>=||>|<|)"
# Various symbols
# - special: "(->|<-)"
# - symbol: "\\.|\\$"
# Data constructors
- constant: "(Nothing|Just|LT|EQ|GT)"
- constant.bool: "\\b(true|false)\\b"
# Strings
- constant.string:
start: "\""
end: "\""
skip: "\\\\."
rules:
- constant.specialChar: "\\\\."
- comment:
start: "\\(\\*"
end: "\\*\\)"
rules:
- todo: "(TODO|XXX|FIXME):?"
- identifier.micro: "undefined"