-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmachine.tmLanguage.json
More file actions
130 lines (130 loc) · 4.71 KB
/
Copy pathmachine.tmLanguage.json
File metadata and controls
130 lines (130 loc) · 4.71 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
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
{
"name": "Machine Notation",
"scopeName": "source.machine",
"patterns": [
{ "include": "#statement" }
],
"repository": {
"statement": {
"patterns": [
{
"begin": "\\[",
"beginCaptures": {
"0": { "name": "punctuation.section.bracket.begin.machine" }
},
"end": "\\]",
"endCaptures": {
"0": { "name": "punctuation.section.bracket.end.machine" }
},
"patterns": [
{ "include": "#header" },
{ "include": "#wiring" }
]
}
]
},
"header": {
"comment": "Header: alias followed by cap URN",
"begin": "([a-zA-Z_][a-zA-Z0-9_-]*)\\s+(cap:)",
"beginCaptures": {
"1": { "name": "entity.name.function.alias.machine" },
"2": { "name": "keyword.other.cap-prefix.machine" }
},
"end": "(?=\\])",
"patterns": [
{ "include": "#cap_urn_body" }
]
},
"cap_urn_body": {
"patterns": [
{
"comment": "Direction spec keys: in= and out=",
"match": "\\b(in|out)(?==)",
"name": "keyword.other.direction-spec.machine"
},
{
"comment": "op= key",
"match": "\\b(op)(?==)",
"name": "keyword.other.op.machine"
},
{
"comment": "Quoted media URN value",
"begin": "\"",
"beginCaptures": {
"0": { "name": "punctuation.definition.string.begin.machine" }
},
"end": "\"",
"endCaptures": {
"0": { "name": "punctuation.definition.string.end.machine" }
},
"name": "string.quoted.double.machine",
"patterns": [
{
"comment": "media: prefix inside quoted value",
"match": "media:",
"name": "support.type.media-prefix.machine"
},
{
"comment": "Escape sequences",
"match": "\\\\.",
"name": "constant.character.escape.machine"
}
]
},
{
"comment": "Unquoted media URN after = (e.g., in=media:pdf)",
"match": "(?<==)(media:[a-zA-Z0-9_-]*)",
"captures": {
"1": { "name": "string.unquoted.media-urn.machine" }
}
},
{
"comment": "Semicolon separator",
"match": ";",
"name": "punctuation.separator.semicolon.machine"
},
{
"comment": "Equals sign",
"match": "=",
"name": "keyword.operator.assignment.machine"
},
{
"comment": "Tag key (other than in/out/op)",
"match": "\\b([a-zA-Z][a-zA-Z0-9_-]*)(?=[;\\]]|$)",
"captures": {
"1": { "name": "variable.other.tag.machine" }
}
}
]
},
"wiring": {
"patterns": [
{
"comment": "Arrow operator",
"match": "-+>",
"name": "keyword.operator.arrow.machine"
},
{
"comment": "Fan-in group opening paren",
"match": "\\(",
"name": "punctuation.section.group.begin.machine"
},
{
"comment": "Fan-in group closing paren",
"match": "\\)",
"name": "punctuation.section.group.end.machine"
},
{
"comment": "Comma separator in fan-in group",
"match": ",",
"name": "punctuation.separator.comma.machine"
},
{
"comment": "Node/alias identifier",
"match": "\\b[a-zA-Z_][a-zA-Z0-9_-]*\\b",
"name": "variable.other.alias.machine"
}
]
}
}
}