forked from seiyria/sublime-dreams
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDM2.JSON-tmLanguage
119 lines (119 loc) · 2.91 KB
/
DM2.JSON-tmLanguage
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
{
"name": "Dream Maker Mk2",
"scopeName": "source.dm2",
"fileTypes": ["dm"],
"repository": {
"comments": {
"patterns": [
{
"begin": "/\\*",
"captures": {
"0": {
"name": "punctuation.definition.comment.dm"
}
},
"end": "\\*/",
"name": "comment.block.dm"
},
{
"begin": "//",
"beginCaptures": {
"0": {
"name": "punctuation.definition.comment.dm"
}
},
"end": "$\\n?",
"name": "comment.line.double-slash.dm",
"patterns": [
{
"match": "(?>\\\\\\s*\\n)",
"name": "punctuation.separator.continuation.dm"
}
]
}
]
},
"type_definition": {
"patterns": [
{ "include": "#comments" },
{
"contentName": "meta.typerange.dm2",
"begin": "^(\\s*?)([A-Za-z\\\\]+)",
"beginCaptures": {
"2": { "name": "meta.type.dm2" }
},
"end": "^(?!\\1\\s)",
"patterns": [
{ "include": "#proc_definitions" },
{ "include": "#proc_definition" },
{ "include": "#var_definitions" },
{ "include": "#type_definition" }
]
}
]
},
"var_definitions": {
"patterns": [
{ "include": "#comments" },
{
"contentName": "meta.varsrange.dm2",
"begin": "^(\\s*?)(var)",
"beginCaptures": {
"1": { "name": "meta.indent.dm2" },
"2": { "name": "keyword.storage.dm2" }
},
"end": "^(?!\\1\\s)",
"endCaptures": {
"0": { "name": "meta.hurr.durr.dm2" }
},
"patterns": [
]
}
]
},
"proc_definitions": {
"patterns": [
{ "include": "#comments" },
{
"contentName": "meta.procsrange.dm2",
"begin": "^(\\s*?)(proc)",
"beginCaptures": {
"1": { "name": "meta.indent.dm2" },
"2": { "name": "keyword.storage.dm2" }
},
"end": "^(?!\\1\\s)",
"patterns": [
{ "include": "#proc_definition" }
]
}
]
},
"proc_definition": {
"patterns": [
{ "include": "#comments" },
{
"contentName": "meta.function_definition.dm2",
"begin": "^(\\s*?)([A-Za-z]+)\\(.*\\)$",
"beginCaptures": {
"1": { "name": "meta.indent.dm2" },
"2": { "name": "meta.function.dm2 entity.name.function.dm2" }
},
"end": "^(?!\\1\\s)",
"patterns": [
{ "include": "#block" }
]
}
]
},
"block": {
"patterns": [
{ "include": "#comments" }
]
}
},
"patterns": [
{ "include": "#comments" },
{ "include": "#type_definition" }
],
"uuid": "1db75b2a-de90-4bc7-8290-034ae7439453"
}