-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path2da.sublime-syntax
More file actions
67 lines (53 loc) · 1.41 KB
/
2da.sublime-syntax
File metadata and controls
67 lines (53 loc) · 1.41 KB
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
%YAML 1.2
---
# See http://www.sublimetext.com/docs/3/syntax.html
file_extensions:
- 2da
scope: source.2da
contexts:
main:
- match: '\r?\n'
set: empty_line
- match: '^2DA\sV2\.0[\s]*?$'
scope: keyword.version.2da
- match: '.*'
scope: invalid.illegal
empty_line:
- match: '\r?\n'
set: table_headers
- match: '[^\s\n]+'
scope: invalid.illegal
table_headers:
- match: '\r?\n'
set: content
- match: '\s"'
scope: punctuation.definition.string.begin.2da
push: double_quoted_column
- match: '\w+'
scope: keyword.declaration.column.2da
double_quoted_column:
- meta_scope: keyword.declaration.column.2da
- match: '"'
scope: punctuation.definition.string.end.2da
pop: true
content:
- match: '^(?!\s*\d).*'
scope: invalid.illegal
- match: '^\s*(\d+)\s+(?:([\w\*]+)|"(.*?)")'
scope: keyword
captures:
1: keyword.line_id.2da meta.toc-list
2: keyword.line_label.2da meta.toc-list
3: keyword.line_label.2da meta.toc-list
- match: '\*\*\*\*'
scope: comment.empty_field.2da
- match: '\s"'
scope: punctuation.definition.string.begin.2da
push: double_quoted_field
- match: '\w+'
scope: string.unquoted.2da
double_quoted_field:
- meta_scope: string.quoted.2da
- match: '"'
scope: punctuation.definition.string.end.2da
pop: true