-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathCMakeCache.sublime-syntax
54 lines (48 loc) · 1.24 KB
/
CMakeCache.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
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: CMakeCache
file_extensions: [CMakeCache.txt]
first_line_match: "# This is the CMakeCache file."
scope: source.cmakecache
variables:
identifier: '[a-zA-Z0-9\-_:\\/ .]+'
contexts:
main:
- include: comments
- include: key-value-pair
comments:
- match: \/\/
scope: punctuation.definition.comment.cmakecache
push:
- meta_scope: comment.line.double-slash.doc.cmakecache
- match: $
pop: true
- match: \#
scope: punctuation.definition.comment.cmakecache
push:
- meta_scope: comment.line.number-sign.cmakecache
- match: $
pop: true
key-value-pair:
- match: ^(\w|-)+
scope: variable.parameter.cmakecache
set: expect-type
- match: .
scope: invalid.illegal.cmakecache
expect-type:
- match: ':'
scope: punctuation.separator.cmakecache
- match: '{{identifier}}'
scope: storage.type.cmakecache
set: expect-value
- match: .
scope: invalid.illegal.cmakecache
expect-value:
- match: '='
scope: keyword.operator.assignment.cmakecache
- match: $
pop: true
- match: .*
scope: string.unquoted.cmakecache
pop: true