-
Notifications
You must be signed in to change notification settings - Fork 2
/
DOT.sublime-syntax
76 lines (76 loc) · 3.16 KB
/
DOT.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
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: Graphviz (DOT)
file_extensions:
- dot
- DOT
first_line_match: digraph.*
scope: source.dot
contexts:
main:
- match: ' ?(digraph)[ \t]+([A-Za-z0-9]+) ?(\{)'
comment: 'named digraph declaration: "digraph NAME {"'
captures:
1: storage.type.dot
2: variable.other.dot
4: punctuation.section.dot
- match: (<|-)(>|-)
comment: "edge definition: <- -> --"
scope: keyword.operator.dot
- match: \b(node|edge|graph|digraph|subgraph|strict)\b
scope: storage.type.dot
- match: \b(bottomlabel|color|comment|distortion|fillcolor|fixedsize|fontcolor|fontname|fontsize|group|height|label|layer|orientation|peripheries|regular|shape|shapefile|sides|skew|style|toplabel|URL|width|z)\b
scope: support.constant.attribute.node.dot
- match: \b(arrowhead|arrowsize|arrowtail|color|comment|constraint|decorate|dir|fontcolor|fontname|fontsize|headlabel|headport|headURL|label|labelangle|labeldistance|labelfloat|labelcolor|labelfontname|labelfontsize|layer|lhead|ltail|minlen|samehead|sametail|splines|style|taillabel|tailport|tailURL|weight)\b
scope: support.constant.attribute.edge.dot
- match: \b(bgcolor|center|clusterrank|color|comment|compound|concentrate|fillcolor|fontname|fontpath|fontsize|label|labeljust|labelloc|layers|margin|mclimit|nodesep|nslimit|nslimit1|ordering|orientation|page|pagedir|quantum|rank|rankdir|ranksep|ratio|remincross|rotate|samplepoints|searchsize|size|style|URL)\b
scope: support.constant.attribute.graph.dot
- match: \b(box|polygon|ellipse|circle|point|egg|triangle|plaintext|diamond|trapezium|parallelogram|house|pentagon|hexagon|septagon|octagon|doublecircle|doubleoctagon|tripleoctagon|invtriangle|invtrapezium|invhouse|Mdiamond|Msquare|Mcircle|rect|rectangle|none|note|tab|folder|box3d|component|max|min|same)\b
scope: variable.other.dot
- match: '"'
captures:
0: punctuation.definition.string.begin.dot
push:
- meta_scope: string.quoted.double.dot
- match: '"'
captures:
0: punctuation.definition.string.end.dot
pop: true
- match: \\.
scope: constant.character.escape.dot
- match: '(^[ \t]+)?(?=//)'
captures:
1: punctuation.whitespace.comment.leading.dot
push:
- match: (?!\G)
pop: true
- match: //
captures:
0: punctuation.definition.comment.dot
push:
- meta_scope: comment.line.double-slash.dot
- match: \n
pop: true
- match: '(^[ \t]+)?(?=#)'
captures:
1: punctuation.whitespace.comment.leading.dot
push:
- match: (?!\G)
pop: true
- match: "#"
captures:
0: punctuation.definition.comment.dot
push:
- meta_scope: comment.line.number-sign.dot
- match: \n
pop: true
- match: /\*
captures:
0: punctuation.definition.comment.dot
push:
- meta_scope: comment.block.dot
- match: \*/
captures:
0: punctuation.definition.comment.dot
pop: true