-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathKDL_.sublime-syntax
32 lines (31 loc) · 1.68 KB
/
KDL_.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
%YAML 1.2
---
name : KDL
file_extensions : [kdl]
scope : text.kdl
first_line_match : '/-[[:blank:]]*kdl-version[[:blank:]]+(1|2)[[:blank:]]*$'
# hidden : true
version : 2
# BOM \x{FEFF}? doesnt' seem to be part of a line for re matching, so not added though it's part of the spec
contexts:
main:
- match : '^(/-)([[:blank:]]*(kdl-version)[[:blank:]]+(2)[[:blank:]]*($))'
scope: comment.block.slash-dash.kdl comment.line.version-marker.kdl
captures:
1: comment.line.slash-dash.kdl punctuation.definition.comment.begin.kdl
2: meta.node.kdl
3: entity.name.tag.node.kdl keyword.other.version-marker.kdl comment.line.slash-dash.kdl
4: meta.argument.value.kdl meta.mapping.value.kdl constant.numeric.value.kdl constant.numeric.integer.kdl constant.numeric.kdl-version.kdl comment.line.slash-dash.kdl
5: punctuation.definition.comment.end.kdl comment.line.slash-dash.kdl
set : KDL2.sublime-syntax
- match : '^(/-)([[:blank:]]*(kdl-version)[[:blank:]]+(1)[[:blank:]]*($))'
scope: comment.block.slash-dash.kdl comment.line.version-marker.kdl
captures:
1: comment.line.slash-dash.kdl punctuation.definition.comment.begin.kdl
2: meta.node.kdl
3: entity.name.tag.node.kdl keyword.other.version-marker.kdl comment.line.slash-dash.kdl
4: meta.argument.value.kdl meta.mapping.value.kdl constant.numeric.value.kdl constant.numeric.integer.kdl constant.numeric.kdl-version.kdl comment.line.slash-dash.kdl
5: punctuation.definition.comment.end.kdl comment.line.slash-dash.kdl
set : KDL1.sublime-syntax
- match : '' # default
set : KDL2.sublime-syntax