-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-syntax.yaml
55 lines (43 loc) · 1.19 KB
/
test-syntax.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
55
filetype: Test-lang
detect:
filename: "\\.tst$"
rules:
# Types
- type: "\\b(?i:(int|float|bool|char|string|unit))\\b"
# Several lines of statements. copy more lines if needed
- statement: "\\b(if|then|else)\\b"
- statement: "\\b(for|and|or)\\b"
# Specialy highlighted keywords
- special: "\\b(let|rec|function|in)\\b"
# Various symbols
- symbol: "(\\||@|!|:|::|_|~|=|\\\\|;|\\(\\)|||\\[|\\]|\\{|\\})"
# Operators
- symbol.operator: "(==|/=|&&|\\|\\||<|>|<=|>=)"
# language constants
- constant: "(Nothing|Just|LT|EQ|GT)"
- constant.bool: "\\b(true|false)\\b"
# Strings "... "
- constant.string:
start: "\""
end: "\""
skip: "\\\\."
rules:
- constant.specialChar: "\\\\."
# Char '.'
- constant.string:
start: "'"
end: "'"
skip: "\\\\."
rules:
- constant.specialChar: "\\\\."
# multi line comment (* ... *)
- comment:
start: "\\(\\*"
end: "\\*\\)"
rules:
- todo: "(TODO|XXX|FIXME):?"
# single line comment # ...
- comment:
start: "#"
end: "$"
rules: []