-
Notifications
You must be signed in to change notification settings - Fork 0
/
Hikari.sublime-syntax
81 lines (69 loc) · 1.92 KB
/
Hikari.sublime-syntax
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
%YAML 1.2
---
# See http://www.sublimetext.com/docs/3/syntax.html
file_extensions:
- hikari
scope: source.hikari
contexts:
prototype:
- include: comments
main:
- include: drive
- include: keywords
- include: operators
- include: unc
- include: group
- include: nbrackets
- include: cbrackets
keywords:
- match: '\b(HOME|ALL|PRINTER)\b'
scope: keyword.declaration.hikari
operators:
- match: '\b(OR|AND|CONTAINS|NOT)\b'
scope: keyword.operator.hikari
drive:
- match: '[D-Zd-z]\:'
scope: keyword.declaration.hikari
unc:
- meta_scope: string.quoted.double.unc.hikari
- match: '"([^"][\\\\][A-Za-z0-9_\.\\ \-&]*\$?)"'
scope: constant.character.escape.hikari
group:
- meta_scope: string.quoted.double.group.hikari
- match: '"([^"][A-Za-z0-9_\.\\ \-&]*\$?)"'
scope: constant.character.escape.hikari
nbrackets:
- match: \(
push: nout_brackets
- match: \)
scope: invalid.illegal.stray-bracket-end
nout_brackets:
- match: \)
pop: true
- include: main
cbrackets:
- match: \{
push: cout_brackets
- match: \}
scope: invalid.illegal.stray-bracket-end
cout_brackets:
- match: \}
pop: true
- include: main
comments:
# Comments begin with a '//' and finish at the end of the line.
- match: '//'
scope: punctuation.definition.comment.hikari
push:
# This is an anonymous context push for brevity.
- meta_scope: comment.line.double-slash.hikari
- match: $\n?
pop: true
# Comments begin with a '/*' and finish at '*/'
- match: '/\*'
scope: punctuation.definition.comment.hikari
push:
# This is an anonymous context push for brevity.
- meta_scope: comment.line.double-slash.hikari
- match: \*/?
pop: true