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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
|
{
"name" : "context.lua",
"patterns" : [
{
"include" : "#keyword"
},
{
"include" : "#buildin"
},
{
"include" : "#constant"
},
{
"include" : "#csname"
},
{
"include" : "#goto"
},
{
"include" : "#number_hex"
},
{
"include" : "#number"
},
{
"include" : "#identifier_keyword"
},
{
"include" : "#identifier_valid"
},
{
"include" : "#longcomment"
},
{
"include" : "#string_long"
},
{
"include" : "#string_double"
},
{
"include" : "#string_single"
},
{
"include" : "#shortcomment"
},
{
"include" : "#label"
},
{
"include" : "#operator"
}
],
"repository" : {
"builtin" : {
"match" : "(xpcall|utf8|unpack|type|tostring|tonumber|table|string|setmetatable|select|require|rawset|rawget|rawequal|print|pcall|pairs|package|os|next|module|math|lpeg|loadfile|load|ipairs|io|getmetatable|file|error|dofile|debug|coroutine|collectgarbage|bit32|assert)(?=[^a-zA-Z])",
"name" : "context.plain.reserved.builtin.lua"
},
"constant" : {
"match" : "(__unm|__tostring|__sub|__pow|__pairs|__newindex|__mul|__mode|__metatable|__lt|__len|__le|__ipairs|__index|__idiv|__gc|__eq|__div|__concat|__close|__call|__add|_VERSION|_M|_G|_ENV|\u005C.\u005C.\u005C.|NaN|<toclose>|<const>)(?=[^a-zA-Z])",
"name" : "context.data.reserved.constants.lua"
},
"csname" : {
"begin" : "(metapost|metafun|ctx[A-Za-z_]*|context|commands)(?=[^a-zA-Z])",
"end" : "(?!(\u005Cs*[\u005C.\u005C:]*\u005Cs*[_\u005Cw][_\u005Cw0-9]*))",
"name" : "context.user.csname.lua",
"patterns" : [
{
"match" : "[\u005C.\u005C:]",
"name" : "context.operator.csname.qualifier.lua"
}
]
},
"goto" : {
"captures" : {
"1" : {
"name" : "context.keyword.goto.keyword.lua"
},
"2" : {
"name" : "context.grouping.goto.target.lua"
}
},
"match" : "(goto)\u005Cs*([_\u005Cw][_\u005Cw0-9]*)"
},
"identifier_keyword" : {
"captures" : {
"1" : {
"name" : "context.operator.identifier.keyword.lua"
},
"2" : {
"name" : "context.warning.identifier.keyword.lua"
}
},
"match" : "\u005Cs*([\u005C.\u005C:])\u005Cs*(while|until|true|then|return|repeat|or|not|nil|local|in|if|function|for|false|end|elseif|else|do|break|and)(?=[^a-zA-Z])"
},
"identifier_valid" : {
"match" : "[_\u005Cw][_\u005Cw0-9]*",
"name" : "context.default.identifier.valid.lua"
},
"keyword" : {
"match" : "(while|until|true|then|return|repeat|or|not|nil|local|in|if|function|for|false|end|elseif|else|do|break|and)(?=[^a-zA-Z])",
"name" : "context.keyword.reserved.keyword.lua"
},
"label" : {
"captures" : {
"1" : {
"name" : "context.keyword.label.open.lua"
},
"2" : {
"name" : "context.grouping.label.target.lua"
},
"3" : {
"name" : "context.keyword.label.close.lua"
}
},
"match" : "(::)([_\u005Cw][_\u005Cw0-9]*)(::)"
},
"longcomment" : {
"begin" : "--\u005C[\u005C[",
"end" : "\u005C]\u005C]",
"name" : "context.comment.comment.long.lua"
},
"number" : {
"match" : "[\u005C-]?[0-9]+(\u005C.[0-9]+)?([eEpP]\u005C-?[0-9]+)?",
"name" : "context.number.decnumber.lua"
},
"number_hex" : {
"match" : "[\u005C-]?0[xX][A-Fa-f0-9]+(\u005C.[A-Fa-f0-9]+)?([eEpP]\u005C-?[A-Fa-f0-9]+)?",
"name" : "context.number.hexnumber.lua"
},
"operator" : {
"match" : "\u005C~|}|\u005C||{|\u005C^|\u005C]|\u005C[|>|=|<|;|:|/|\u005C.|\u005C-|,|\u005C+|\u005C*|\u005C)|\u005C(|\u005C'|\u005C%|#",
"name" : "context.special.operator.lua"
},
"shortcomment" : {
"match" : "--.*$\u005Cn?",
"name" : "context.comment.comment.short.lua"
},
"string_double" : {
"captures" : {
"1" : {
"name" : "context.special.doublequoted.open.lua"
},
"2" : {
"name" : "context.string.doublequoted.text.lua"
},
"3" : {
"name" : "context.special.doublequoted.close.lua"
}
},
"match" : "(\u0022)((?:\u005C\u005C\u0022|[^\u0022])*)(\u0022)"
},
"string_long" : {
"begin" : "\u005C[(=*)\u005C[",
"beginCaptures" : {
"0" : {
"name" : "context.special.string.long.open.lua"
}
},
"end" : "\u005C](\u005C2)\u005C]",
"endCaptures" : {
"0" : {
"name" : "context.special.string.long.close.lua"
}
},
"name" : "context.string.long.text.lua"
},
"string_single" : {
"captures" : {
"1" : {
"name" : "context.special.singlequoted.open.lua"
},
"2" : {
"name" : "context.string.singlequoted.text.lua"
},
"3" : {
"name" : "context.special.singlequoted.close.lua"
}
},
"match" : "(')((?:\u005C\u005C'|[^'])*)(')"
}
},
"scopeName" : "source.context.lua",
"version" : "1.0.0"
}
|