-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtome.sublime-syntax
99 lines (76 loc) · 1.92 KB
/
tome.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
%YAML 1.2
---
# See http://www.sublimetext.com/docs/3/syntax.html
name: Tome
scopeName: tome.
fileTypes: [tome]
file_extensions:
- tome
scope: source.tome
contexts:
# The prototype context is prepended to all contexts but those setting
# meta_include_prototype: false.
prototype:
- include: comments
main:
# The main context is the initial starting point of our syntax.
# Include other contexts from here (or specify them directly).
- include: keywords
- include: numbers
- include: strings
keywords:
- match: '\s:\s'
scope: string.control
pop: true
- match: '~'
scope: string.control.tome
pop: true
- match: ' ! '
scope: string.control.tome
pop: true
- match: ' | '
scope: string.control.tome
pop: true
- match: '# '
scope: string.control.tome
pop: true
- match: '- '
scope: string.control.tome
pop: true
- match: '&'
scope: string.control
pop: true
- match: '\*\ '
scope: string.control.tome
pop: true
- match: '\?\ '
scope: string.control.tome
- match: '% '
scope: string.control.tome
- match: '= '
scope: string.control.tome
- match: '\+\ '
scope: string.control.tome
- match: '> '
scope: string.control.tome
strings:
# Line starting in all caps
- match: '^[A-Z_]+\b.*'
push:
- meta_scope: keyword.control.tome
- match: '$\n?'
pop: true
comments:
# Comments begin with a '//' and finish at the end of the line.
- match: 'DATABASE'
scope: punctuation.definition.comment.tome
push:
- meta_scope: comment.line.double-slash.tome
- match: $\n?
pop: true
- match: '`'
scope: punctuation.definition.comment.tome
push:
- meta_scope: comment.line.double-slash.tome
- match: $\n?
pop: true