@enjoys/context-engine 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/commands/dockerfile.json +66 -0
- package/data/commands/lua.json +66 -0
- package/data/commands/manifest.json +3 -0
- package/data/commands/sql.json +34 -0
- package/data/completion/caddy.json +1589 -0
- package/data/completion/dockerfile.json +1062 -313
- package/data/completion/lua.json +2283 -617
- package/data/completion/nginx.json +804 -1
- package/data/completion/redis-cli.json +3405 -0
- package/data/completion/sql.json +2684 -552
- package/data/defination/caddy.json +428 -0
- package/data/defination/dockerfile.json +211 -29
- package/data/defination/lua.json +875 -125
- package/data/defination/nginx.json +164 -1
- package/data/defination/redis-cli.json +1853 -0
- package/data/defination/sql.json +998 -326
- package/data/hover/caddy.json +458 -0
- package/data/hover/dockerfile.json +180 -42
- package/data/hover/lua.json +775 -69
- package/data/hover/nginx.json +760 -0
- package/data/hover/redis-cli.json +1088 -0
- package/data/hover/sql.json +1119 -76
- package/data/manifest.json +14 -2
- package/package.json +1 -1
package/data/defination/lua.json
CHANGED
|
@@ -1,181 +1,931 @@
|
|
|
1
1
|
{
|
|
2
2
|
"language": "lua",
|
|
3
3
|
"definitions": {
|
|
4
|
+
"print": {
|
|
5
|
+
"signature": "print(···)",
|
|
6
|
+
"description": "Receives any number of arguments and prints their values to stdout, converting each with tostring. Values are tab-separated with a trailing newline.",
|
|
7
|
+
"type": "function",
|
|
8
|
+
"module": "global"
|
|
9
|
+
},
|
|
10
|
+
"type": {
|
|
11
|
+
"signature": "type(v) -> string",
|
|
12
|
+
"description": "Returns the type of its only argument, coded as a string: \"nil\", \"number\", \"string\", \"boolean\", \"table\", \"function\", \"thread\", or \"userdata\".",
|
|
13
|
+
"type": "function",
|
|
14
|
+
"module": "global"
|
|
15
|
+
},
|
|
16
|
+
"tostring": {
|
|
17
|
+
"signature": "tostring(v) -> string",
|
|
18
|
+
"description": "Converts any value to a string. If the metatable has a __tostring metamethod, calls it.",
|
|
19
|
+
"type": "function",
|
|
20
|
+
"module": "global"
|
|
21
|
+
},
|
|
22
|
+
"tonumber": {
|
|
23
|
+
"signature": "tonumber(e [, base]) -> number | nil",
|
|
24
|
+
"description": "Converts its argument to a number. An optional base (2–36) interprets the string in that base. Returns nil if conversion fails.",
|
|
25
|
+
"type": "function",
|
|
26
|
+
"module": "global"
|
|
27
|
+
},
|
|
28
|
+
"pairs": {
|
|
29
|
+
"signature": "pairs(t) -> function, table, nil",
|
|
30
|
+
"description": "Returns the next function, the table t, and nil, enabling iteration over all key–value pairs with a generic for.",
|
|
31
|
+
"type": "function",
|
|
32
|
+
"module": "global"
|
|
33
|
+
},
|
|
34
|
+
"ipairs": {
|
|
35
|
+
"signature": "ipairs(t) -> function, table, 0",
|
|
36
|
+
"description": "Returns an iterator for integer keys 1, 2, … until a nil value is found. Suitable for arrays/sequences.",
|
|
37
|
+
"type": "function",
|
|
38
|
+
"module": "global"
|
|
39
|
+
},
|
|
40
|
+
"next": {
|
|
41
|
+
"signature": "next(table [, index]) -> key, value | nil",
|
|
42
|
+
"description": "Returns the next index of the table and its associated value. When called with nil as the second argument, returns an initial index and value.",
|
|
43
|
+
"type": "function",
|
|
44
|
+
"module": "global"
|
|
45
|
+
},
|
|
46
|
+
"select": {
|
|
47
|
+
"signature": "select(index, ···) -> ...",
|
|
48
|
+
"description": "If index is a number, returns all arguments after that position. If index is \"#\", returns the total argument count.",
|
|
49
|
+
"type": "function",
|
|
50
|
+
"module": "global"
|
|
51
|
+
},
|
|
52
|
+
"rawget": {
|
|
53
|
+
"signature": "rawget(table, index) -> any",
|
|
54
|
+
"description": "Gets table[index] without invoking the __index metamethod.",
|
|
55
|
+
"type": "function",
|
|
56
|
+
"module": "global"
|
|
57
|
+
},
|
|
58
|
+
"rawset": {
|
|
59
|
+
"signature": "rawset(table, index, value) -> table",
|
|
60
|
+
"description": "Sets table[index] = value without invoking the __newindex metamethod.",
|
|
61
|
+
"type": "function",
|
|
62
|
+
"module": "global"
|
|
63
|
+
},
|
|
64
|
+
"rawequal": {
|
|
65
|
+
"signature": "rawequal(v1, v2) -> boolean",
|
|
66
|
+
"description": "Checks whether v1 equals v2 without invoking the __eq metamethod.",
|
|
67
|
+
"type": "function",
|
|
68
|
+
"module": "global"
|
|
69
|
+
},
|
|
70
|
+
"rawlen": {
|
|
71
|
+
"signature": "rawlen(v) -> integer",
|
|
72
|
+
"description": "Returns the length of a table or string without invoking the __len metamethod. Available in Lua 5.2+.",
|
|
73
|
+
"type": "function",
|
|
74
|
+
"module": "global"
|
|
75
|
+
},
|
|
76
|
+
"setmetatable": {
|
|
77
|
+
"signature": "setmetatable(table, metatable) -> table",
|
|
78
|
+
"description": "Sets the metatable for the given table. If metatable is nil, removes the metatable. If the original metatable has a __metatable field, raises an error.",
|
|
79
|
+
"type": "function",
|
|
80
|
+
"module": "global"
|
|
81
|
+
},
|
|
82
|
+
"getmetatable": {
|
|
83
|
+
"signature": "getmetatable(object) -> table | nil | any",
|
|
84
|
+
"description": "Returns the metatable of the object. If the metatable has a __metatable field, returns that value instead.",
|
|
85
|
+
"type": "function",
|
|
86
|
+
"module": "global"
|
|
87
|
+
},
|
|
88
|
+
"require": {
|
|
89
|
+
"signature": "require(modname) -> any",
|
|
90
|
+
"description": "Loads the given module. Checks package.loaded first, then searches using package.searchers (5.2+) or package.loaders (5.1). Caches the result.",
|
|
91
|
+
"type": "function",
|
|
92
|
+
"module": "global"
|
|
93
|
+
},
|
|
94
|
+
"dofile": {
|
|
95
|
+
"signature": "dofile([filename]) -> ...",
|
|
96
|
+
"description": "Opens the named file and executes its contents as a Lua chunk. Returns values returned by the chunk. Without arguments, executes stdin.",
|
|
97
|
+
"type": "function",
|
|
98
|
+
"module": "global"
|
|
99
|
+
},
|
|
100
|
+
"loadfile": {
|
|
101
|
+
"signature": "loadfile([filename [, mode [, env]]]) -> function | nil, string",
|
|
102
|
+
"description": "Loads a file as a Lua chunk without executing it. Returns the compiled chunk as a function, or nil plus an error message.",
|
|
103
|
+
"type": "function",
|
|
104
|
+
"module": "global"
|
|
105
|
+
},
|
|
106
|
+
"load": {
|
|
107
|
+
"signature": "load(chunk [, chunkname [, mode [, env]]]) -> function | nil, string",
|
|
108
|
+
"description": "Loads a chunk from a string or function. Returns the compiled chunk as a function, or nil plus an error message.",
|
|
109
|
+
"type": "function",
|
|
110
|
+
"module": "global"
|
|
111
|
+
},
|
|
112
|
+
"pcall": {
|
|
113
|
+
"signature": "pcall(f [, arg1, ···]) -> boolean, ...",
|
|
114
|
+
"description": "Calls function f in protected mode. Returns true plus results on success, false plus the error object on failure.",
|
|
115
|
+
"type": "function",
|
|
116
|
+
"module": "global"
|
|
117
|
+
},
|
|
118
|
+
"xpcall": {
|
|
119
|
+
"signature": "xpcall(f, msgh [, arg1, ···]) -> boolean, ...",
|
|
120
|
+
"description": "Like pcall but sets the message handler msgh for error handling. Extra arguments to f supported in Lua 5.2+ and LuaJIT 2.1.",
|
|
121
|
+
"type": "function",
|
|
122
|
+
"module": "global"
|
|
123
|
+
},
|
|
124
|
+
"error": {
|
|
125
|
+
"signature": "error(message [, level])",
|
|
126
|
+
"description": "Raises an error with the given message. Level controls the error position: 1 (default) = where error was called, 2 = caller, 0 = no position.",
|
|
127
|
+
"type": "function",
|
|
128
|
+
"module": "global"
|
|
129
|
+
},
|
|
130
|
+
"assert": {
|
|
131
|
+
"signature": "assert(v [, message]) -> v, message",
|
|
132
|
+
"description": "Calls error if v is false or nil; otherwise returns all its arguments. Default message is \"assertion failed!\".",
|
|
133
|
+
"type": "function",
|
|
134
|
+
"module": "global"
|
|
135
|
+
},
|
|
136
|
+
"collectgarbage": {
|
|
137
|
+
"signature": "collectgarbage([opt [, arg]]) -> varies",
|
|
138
|
+
"description": "Generic interface to the garbage collector. Options include \"collect\", \"stop\", \"restart\", \"count\", \"step\", \"isrunning\", \"incremental\" (5.4), \"generational\" (5.4).",
|
|
139
|
+
"type": "function",
|
|
140
|
+
"module": "global"
|
|
141
|
+
},
|
|
142
|
+
"unpack": {
|
|
143
|
+
"signature": "unpack(list [, i [, j]]) -> ...",
|
|
144
|
+
"description": "Returns the elements from the given list. In Lua 5.2+ this is table.unpack. default i is 1, j is #list.",
|
|
145
|
+
"type": "function",
|
|
146
|
+
"module": "global"
|
|
147
|
+
},
|
|
148
|
+
"warn": {
|
|
149
|
+
"signature": "warn(msg1 [, msg2, ···])",
|
|
150
|
+
"description": "Emits a warning with the given message segments. If the first segment starts with \"@\", it controls warnings: \"@on\" / \"@off\". Available in Lua 5.4+.",
|
|
151
|
+
"type": "function",
|
|
152
|
+
"module": "global"
|
|
153
|
+
},
|
|
154
|
+
"_G": {
|
|
155
|
+
"signature": "_G",
|
|
156
|
+
"description": "A global variable holding a reference to the global environment table. In Lua 5.2+, just a regular global containing the global table.",
|
|
157
|
+
"type": "variable",
|
|
158
|
+
"module": "global"
|
|
159
|
+
},
|
|
160
|
+
"_ENV": {
|
|
161
|
+
"signature": "_ENV",
|
|
162
|
+
"description": "The environment table for the current chunk (Lua 5.2+). Free names are syntactic sugar for _ENV.name. Changing _ENV changes visible globals.",
|
|
163
|
+
"type": "variable",
|
|
164
|
+
"module": "global"
|
|
165
|
+
},
|
|
166
|
+
"_VERSION": {
|
|
167
|
+
"signature": "_VERSION",
|
|
168
|
+
"description": "A global string containing the running Lua version, e.g. \"Lua 5.4\".",
|
|
169
|
+
"type": "variable",
|
|
170
|
+
"module": "global"
|
|
171
|
+
},
|
|
172
|
+
"loadstring": {
|
|
173
|
+
"signature": "loadstring(string [, chunkname]) -> function | nil, string",
|
|
174
|
+
"description": "Loads a string as a Lua chunk (Lua 5.1). In Lua 5.2+ use load() instead.",
|
|
175
|
+
"type": "function",
|
|
176
|
+
"module": "global"
|
|
177
|
+
},
|
|
178
|
+
"module": {
|
|
179
|
+
"signature": "module(name [, ···])",
|
|
180
|
+
"description": "Creates a module (Lua 5.1). Deprecated in Lua 5.2+ in favor of the return-a-table pattern.",
|
|
181
|
+
"type": "function",
|
|
182
|
+
"module": "global"
|
|
183
|
+
},
|
|
4
184
|
"string": {
|
|
5
185
|
"signature": "string library",
|
|
6
|
-
"description": "
|
|
186
|
+
"description": "Provides generic string manipulation functions. Strings in Lua are indexed starting at 1, are immutable, and can contain embedded zeros.",
|
|
7
187
|
"type": "module",
|
|
8
188
|
"module": "string",
|
|
9
189
|
"members": {
|
|
10
|
-
"format": {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
190
|
+
"format": {
|
|
191
|
+
"signature": "string.format(formatstring, ···)",
|
|
192
|
+
"description": "Returns a formatted version of its arguments following the format description, similar to C sprintf. Supports %d, %i, %u, %f, %e, %g, %x, %o, %s, %q, %c, and %%.",
|
|
193
|
+
"type": "function"
|
|
194
|
+
},
|
|
195
|
+
"find": {
|
|
196
|
+
"signature": "string.find(s, pattern [, init [, plain]])",
|
|
197
|
+
"description": "Looks for the first match of pattern in s. Returns start and end indices, and any captures. If plain is true, pattern matching is off.",
|
|
198
|
+
"type": "function"
|
|
199
|
+
},
|
|
200
|
+
"match": {
|
|
201
|
+
"signature": "string.match(s, pattern [, init])",
|
|
202
|
+
"description": "Returns the captures from the first match of pattern in s or nil. If no captures, returns the whole match.",
|
|
203
|
+
"type": "function"
|
|
204
|
+
},
|
|
205
|
+
"gmatch": {
|
|
206
|
+
"signature": "string.gmatch(s, pattern [, init])",
|
|
207
|
+
"description": "Returns an iterator that produces the successive captures from pattern over s. Lua 5.4 added the optional init parameter.",
|
|
208
|
+
"type": "function"
|
|
209
|
+
},
|
|
210
|
+
"gsub": {
|
|
211
|
+
"signature": "string.gsub(s, pattern, repl [, n])",
|
|
212
|
+
"description": "Returns a copy of s with all (or first n) occurrences of pattern replaced by repl (string, table, or function). Also returns total match count.",
|
|
213
|
+
"type": "function"
|
|
214
|
+
},
|
|
215
|
+
"sub": {
|
|
216
|
+
"signature": "string.sub(s, i [, j])",
|
|
217
|
+
"description": "Returns the substring from position i to j (inclusive). Negative indices count from the end. Default j is -1.",
|
|
218
|
+
"type": "function"
|
|
219
|
+
},
|
|
220
|
+
"rep": {
|
|
221
|
+
"signature": "string.rep(s, n [, sep])",
|
|
222
|
+
"description": "Returns n copies of s concatenated, separated by sep (default empty). The sep parameter available since Lua 5.2.",
|
|
223
|
+
"type": "function"
|
|
224
|
+
},
|
|
225
|
+
"reverse": {
|
|
226
|
+
"signature": "string.reverse(s)",
|
|
227
|
+
"description": "Returns the string s reversed.",
|
|
228
|
+
"type": "function"
|
|
229
|
+
},
|
|
230
|
+
"upper": {
|
|
231
|
+
"signature": "string.upper(s)",
|
|
232
|
+
"description": "Returns a copy of s with all lowercase letters changed to uppercase.",
|
|
233
|
+
"type": "function"
|
|
234
|
+
},
|
|
235
|
+
"lower": {
|
|
236
|
+
"signature": "string.lower(s)",
|
|
237
|
+
"description": "Returns a copy of s with all uppercase letters changed to lowercase.",
|
|
238
|
+
"type": "function"
|
|
239
|
+
},
|
|
240
|
+
"len": {
|
|
241
|
+
"signature": "string.len(s)",
|
|
242
|
+
"description": "Returns the length of the string s. Embedded zeros are counted.",
|
|
243
|
+
"type": "function"
|
|
244
|
+
},
|
|
245
|
+
"byte": {
|
|
246
|
+
"signature": "string.byte(s [, i [, j]])",
|
|
247
|
+
"description": "Returns the internal numeric codes of characters s[i] through s[j]. Defaults: i=1, j=i.",
|
|
248
|
+
"type": "function"
|
|
249
|
+
},
|
|
250
|
+
"char": {
|
|
251
|
+
"signature": "string.char(···)",
|
|
252
|
+
"description": "Returns a string with each character having the numeric code of the corresponding argument.",
|
|
253
|
+
"type": "function"
|
|
254
|
+
},
|
|
255
|
+
"dump": {
|
|
256
|
+
"signature": "string.dump(function [, strip])",
|
|
257
|
+
"description": "Returns a binary representation of the given function. If strip is true (5.3+), excludes debug info.",
|
|
258
|
+
"type": "function"
|
|
259
|
+
},
|
|
260
|
+
"pack": {
|
|
261
|
+
"signature": "string.pack(fmt, v1, v2, ···)",
|
|
262
|
+
"description": "Returns a binary string containing the values packed according to the format string fmt. Available in Lua 5.3+.",
|
|
263
|
+
"type": "function"
|
|
264
|
+
},
|
|
265
|
+
"unpack": {
|
|
266
|
+
"signature": "string.unpack(fmt, s [, pos])",
|
|
267
|
+
"description": "Returns the values packed in string s according to fmt. Also returns the position after the last read byte. Lua 5.3+.",
|
|
268
|
+
"type": "function"
|
|
269
|
+
},
|
|
270
|
+
"packsize": {
|
|
271
|
+
"signature": "string.packsize(fmt)",
|
|
272
|
+
"description": "Returns the size of a string resulting from string.pack with the given format, without variable-length options. Lua 5.3+.",
|
|
273
|
+
"type": "function"
|
|
274
|
+
}
|
|
24
275
|
}
|
|
25
276
|
},
|
|
26
277
|
"table": {
|
|
27
278
|
"signature": "table library",
|
|
28
|
-
"description": "
|
|
279
|
+
"description": "Provides generic functions for table manipulation. Most functions assume the table represents a list/array with integer keys from 1 to n.",
|
|
29
280
|
"type": "module",
|
|
30
281
|
"module": "table",
|
|
31
282
|
"members": {
|
|
32
|
-
"insert": {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
|
|
283
|
+
"insert": {
|
|
284
|
+
"signature": "table.insert(list, [pos,] value)",
|
|
285
|
+
"description": "Inserts value at position pos (default #list+1), shifting subsequent elements up.",
|
|
286
|
+
"type": "function"
|
|
287
|
+
},
|
|
288
|
+
"remove": {
|
|
289
|
+
"signature": "table.remove(list [, pos])",
|
|
290
|
+
"description": "Removes and returns the element at position pos (default #list), shifting subsequent elements down.",
|
|
291
|
+
"type": "function"
|
|
292
|
+
},
|
|
293
|
+
"sort": {
|
|
294
|
+
"signature": "table.sort(list [, comp])",
|
|
295
|
+
"description": "Sorts list elements in-place. If comp is given, it must return true when the first element should come before the second.",
|
|
296
|
+
"type": "function"
|
|
297
|
+
},
|
|
298
|
+
"concat": {
|
|
299
|
+
"signature": "table.concat(list [, sep [, i [, j]]])",
|
|
300
|
+
"description": "Returns the concatenation of list[i]..sep..list[i+1]..sep..list[j]. Default sep is empty string, i=1, j=#list.",
|
|
301
|
+
"type": "function"
|
|
302
|
+
},
|
|
303
|
+
"move": {
|
|
304
|
+
"signature": "table.move(a1, f, e, t [, a2])",
|
|
305
|
+
"description": "Copies elements a1[f]..a1[e] into a2[t]..a2[t+e-f]. Default a2 is a1. Available in Lua 5.3+.",
|
|
306
|
+
"type": "function"
|
|
307
|
+
},
|
|
308
|
+
"pack": {
|
|
309
|
+
"signature": "table.pack(···)",
|
|
310
|
+
"description": "Returns a new table with all arguments stored into keys 1, 2, etc., and a field 'n' with the total count. Lua 5.2+.",
|
|
311
|
+
"type": "function"
|
|
312
|
+
},
|
|
313
|
+
"unpack": {
|
|
314
|
+
"signature": "table.unpack(list [, i [, j]])",
|
|
315
|
+
"description": "Returns the elements from the given list. Equivalent to return list[i], ..., list[j]. Lua 5.2+ (global unpack in 5.1).",
|
|
316
|
+
"type": "function"
|
|
317
|
+
}
|
|
39
318
|
}
|
|
40
319
|
},
|
|
41
320
|
"math": {
|
|
42
321
|
"signature": "math library",
|
|
43
|
-
"description": "
|
|
322
|
+
"description": "Provides standard mathematical functions and constants. In Lua 5.3+, functions with annotation 'integer/float' give integer results for integer arguments.",
|
|
44
323
|
"type": "module",
|
|
45
324
|
"module": "math",
|
|
46
325
|
"members": {
|
|
47
|
-
"abs": {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
326
|
+
"abs": {
|
|
327
|
+
"signature": "math.abs(x)",
|
|
328
|
+
"description": "Returns the absolute value of x. (integer/float)",
|
|
329
|
+
"type": "function"
|
|
330
|
+
},
|
|
331
|
+
"ceil": {
|
|
332
|
+
"signature": "math.ceil(x)",
|
|
333
|
+
"description": "Returns the smallest integral value greater than or equal to x.",
|
|
334
|
+
"type": "function"
|
|
335
|
+
},
|
|
336
|
+
"floor": {
|
|
337
|
+
"signature": "math.floor(x)",
|
|
338
|
+
"description": "Returns the largest integral value less than or equal to x.",
|
|
339
|
+
"type": "function"
|
|
340
|
+
},
|
|
341
|
+
"sqrt": {
|
|
342
|
+
"signature": "math.sqrt(x)",
|
|
343
|
+
"description": "Returns the square root of x.",
|
|
344
|
+
"type": "function"
|
|
345
|
+
},
|
|
346
|
+
"sin": {
|
|
347
|
+
"signature": "math.sin(x)",
|
|
348
|
+
"description": "Returns the sine of x (in radians).",
|
|
349
|
+
"type": "function"
|
|
350
|
+
},
|
|
351
|
+
"cos": {
|
|
352
|
+
"signature": "math.cos(x)",
|
|
353
|
+
"description": "Returns the cosine of x (in radians).",
|
|
354
|
+
"type": "function"
|
|
355
|
+
},
|
|
356
|
+
"tan": {
|
|
357
|
+
"signature": "math.tan(x)",
|
|
358
|
+
"description": "Returns the tangent of x (in radians).",
|
|
359
|
+
"type": "function"
|
|
360
|
+
},
|
|
361
|
+
"asin": {
|
|
362
|
+
"signature": "math.asin(x)",
|
|
363
|
+
"description": "Returns the arc sine of x (in radians).",
|
|
364
|
+
"type": "function"
|
|
365
|
+
},
|
|
366
|
+
"acos": {
|
|
367
|
+
"signature": "math.acos(x)",
|
|
368
|
+
"description": "Returns the arc cosine of x (in radians).",
|
|
369
|
+
"type": "function"
|
|
370
|
+
},
|
|
371
|
+
"atan": {
|
|
372
|
+
"signature": "math.atan(y [, x])",
|
|
373
|
+
"description": "Returns the arc tangent of y/x (in radians). In Lua 5.3+, replaced math.atan2.",
|
|
374
|
+
"type": "function"
|
|
375
|
+
},
|
|
376
|
+
"exp": {
|
|
377
|
+
"signature": "math.exp(x)",
|
|
378
|
+
"description": "Returns e^x.",
|
|
379
|
+
"type": "function"
|
|
380
|
+
},
|
|
381
|
+
"log": {
|
|
382
|
+
"signature": "math.log(x [, base])",
|
|
383
|
+
"description": "Returns the logarithm of x in the given base. Default is e (natural log). The base parameter is available Lua 5.2+.",
|
|
384
|
+
"type": "function"
|
|
385
|
+
},
|
|
386
|
+
"max": {
|
|
387
|
+
"signature": "math.max(x, ···)",
|
|
388
|
+
"description": "Returns the argument with the maximum value.",
|
|
389
|
+
"type": "function"
|
|
390
|
+
},
|
|
391
|
+
"min": {
|
|
392
|
+
"signature": "math.min(x, ···)",
|
|
393
|
+
"description": "Returns the argument with the minimum value.",
|
|
394
|
+
"type": "function"
|
|
395
|
+
},
|
|
396
|
+
"random": {
|
|
397
|
+
"signature": "math.random([m [, n]])",
|
|
398
|
+
"description": "Returns a pseudo-random number. Without arguments: float in [0,1). With m: integer in [1,m]. With m,n: integer in [m,n]. Lua 5.4 uses xoshiro256**.",
|
|
399
|
+
"type": "function"
|
|
400
|
+
},
|
|
401
|
+
"randomseed": {
|
|
402
|
+
"signature": "math.randomseed([x [, y]])",
|
|
403
|
+
"description": "Sets the seed for the pseudo-random generator. In Lua 5.4, called without arguments generates a reasonable seed.",
|
|
404
|
+
"type": "function"
|
|
405
|
+
},
|
|
406
|
+
"fmod": {
|
|
407
|
+
"signature": "math.fmod(x, y)",
|
|
408
|
+
"description": "Returns the remainder of x/y that rounds the quotient towards zero.",
|
|
409
|
+
"type": "function"
|
|
410
|
+
},
|
|
411
|
+
"tointeger": {
|
|
412
|
+
"signature": "math.tointeger(x)",
|
|
413
|
+
"description": "If x is representable as a Lua integer, returns it; otherwise returns nil. Lua 5.3+.",
|
|
414
|
+
"type": "function"
|
|
415
|
+
},
|
|
416
|
+
"type": {
|
|
417
|
+
"signature": "math.type(x)",
|
|
418
|
+
"description": "Returns 'integer' if x is an integer, 'float' if a float, or nil if not a number. Lua 5.3+.",
|
|
419
|
+
"type": "function"
|
|
420
|
+
},
|
|
421
|
+
"huge": {
|
|
422
|
+
"signature": "math.huge",
|
|
423
|
+
"description": "The float value HUGE_VAL (positive infinity).",
|
|
424
|
+
"type": "constant"
|
|
425
|
+
},
|
|
426
|
+
"pi": {
|
|
427
|
+
"signature": "math.pi",
|
|
428
|
+
"description": "The value of π.",
|
|
429
|
+
"type": "constant"
|
|
430
|
+
},
|
|
431
|
+
"maxinteger": {
|
|
432
|
+
"signature": "math.maxinteger",
|
|
433
|
+
"description": "Maximum value for an integer (Lua 5.3+).",
|
|
434
|
+
"type": "constant"
|
|
435
|
+
},
|
|
436
|
+
"mininteger": {
|
|
437
|
+
"signature": "math.mininteger",
|
|
438
|
+
"description": "Minimum value for an integer (Lua 5.3+).",
|
|
439
|
+
"type": "constant"
|
|
440
|
+
},
|
|
441
|
+
"ult": {
|
|
442
|
+
"signature": "math.ult(m, n)",
|
|
443
|
+
"description": "Returns true if integer m is below integer n when compared as unsigned integers. (5.3+)"
|
|
444
|
+
}
|
|
70
445
|
}
|
|
71
446
|
},
|
|
72
447
|
"io": {
|
|
73
448
|
"signature": "io library",
|
|
74
|
-
"description": "
|
|
449
|
+
"description": "Provides two styles for file manipulation: implicit file handles (io.read, io.write operate on default files) and explicit file handles from io.open.",
|
|
75
450
|
"type": "module",
|
|
76
451
|
"module": "io",
|
|
77
452
|
"members": {
|
|
78
|
-
"open": {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
453
|
+
"open": {
|
|
454
|
+
"signature": "io.open(filename [, mode])",
|
|
455
|
+
"description": "Opens a file in the specified mode. Returns a file handle, or nil plus an error. Modes: 'r', 'w', 'a', 'r+', 'w+', 'a+'. Append 'b' for binary.",
|
|
456
|
+
"type": "function"
|
|
457
|
+
},
|
|
458
|
+
"close": {
|
|
459
|
+
"signature": "io.close([file])",
|
|
460
|
+
"description": "Closes the given file handle (or the default output file). Equivalent to file:close().",
|
|
461
|
+
"type": "function"
|
|
462
|
+
},
|
|
463
|
+
"read": {
|
|
464
|
+
"signature": "io.read(···)",
|
|
465
|
+
"description": "Reads from the default input file. Formats: '*n'/'n' (number), '*a'/'a' (whole file), '*l'/'l' (line, default), '*L'/'L' (line with newline).",
|
|
466
|
+
"type": "function"
|
|
467
|
+
},
|
|
468
|
+
"write": {
|
|
469
|
+
"signature": "io.write(···)",
|
|
470
|
+
"description": "Writes each argument to the default output file.",
|
|
471
|
+
"type": "function"
|
|
472
|
+
},
|
|
473
|
+
"lines": {
|
|
474
|
+
"signature": "io.lines([filename, ···])",
|
|
475
|
+
"description": "Opens the given file and returns an iterator that reads using the given formats. Closes the file when the iterator finishes.",
|
|
476
|
+
"type": "function"
|
|
477
|
+
},
|
|
478
|
+
"input": {
|
|
479
|
+
"signature": "io.input([file])",
|
|
480
|
+
"description": "Sets or gets the default input file. With a filename, opens and sets it. With a file handle, sets it. Without arguments, returns the current default input.",
|
|
481
|
+
"type": "function"
|
|
482
|
+
},
|
|
483
|
+
"output": {
|
|
484
|
+
"signature": "io.output([file])",
|
|
485
|
+
"description": "Sets or gets the default output file.",
|
|
486
|
+
"type": "function"
|
|
487
|
+
},
|
|
488
|
+
"flush": {
|
|
489
|
+
"signature": "io.flush()",
|
|
490
|
+
"description": "Flushes the default output file. Equivalent to io.output():flush().",
|
|
491
|
+
"type": "function"
|
|
492
|
+
},
|
|
493
|
+
"tmpfile": {
|
|
494
|
+
"signature": "io.tmpfile()",
|
|
495
|
+
"description": "Returns a handle for a temporary file opened in update mode. Auto-removed on program end.",
|
|
496
|
+
"type": "function"
|
|
497
|
+
},
|
|
498
|
+
"type": {
|
|
499
|
+
"signature": "io.type(obj)",
|
|
500
|
+
"description": "Checks whether obj is a valid file handle. Returns \"file\" for an open handle, \"closed file\" for a closed handle, or nil otherwise.",
|
|
501
|
+
"type": "function"
|
|
502
|
+
},
|
|
503
|
+
"stdin": {
|
|
504
|
+
"signature": "io.stdin",
|
|
505
|
+
"description": "Standard input file handle.",
|
|
506
|
+
"type": "field"
|
|
507
|
+
},
|
|
508
|
+
"stdout": {
|
|
509
|
+
"signature": "io.stdout",
|
|
510
|
+
"description": "Standard output file handle.",
|
|
511
|
+
"type": "field"
|
|
512
|
+
},
|
|
513
|
+
"stderr": {
|
|
514
|
+
"signature": "io.stderr",
|
|
515
|
+
"description": "Standard error file handle.",
|
|
516
|
+
"type": "field"
|
|
517
|
+
},
|
|
518
|
+
"popen": {
|
|
519
|
+
"signature": "io.popen(prog [, mode])",
|
|
520
|
+
"description": "Execute command and return file handle for pipe. mode: 'r' (read, default) or 'w' (write)."
|
|
521
|
+
}
|
|
88
522
|
}
|
|
89
523
|
},
|
|
90
524
|
"os": {
|
|
91
525
|
"signature": "os library",
|
|
92
|
-
"description": "
|
|
526
|
+
"description": "Provides OS-level functions for date/time, file operations, and process control.",
|
|
93
527
|
"type": "module",
|
|
94
528
|
"module": "os",
|
|
95
529
|
"members": {
|
|
96
|
-
"
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
"
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
"
|
|
530
|
+
"clock": {
|
|
531
|
+
"signature": "os.clock()",
|
|
532
|
+
"description": "Returns an approximation of the CPU time used by the program, in seconds.",
|
|
533
|
+
"type": "function"
|
|
534
|
+
},
|
|
535
|
+
"time": {
|
|
536
|
+
"signature": "os.time([table])",
|
|
537
|
+
"description": "Returns the current time as a number (usually epoch seconds), or the time represented by the given table.",
|
|
538
|
+
"type": "function"
|
|
539
|
+
},
|
|
540
|
+
"date": {
|
|
541
|
+
"signature": "os.date([format [, time]])",
|
|
542
|
+
"description": "Returns a string or table with date and time, formatted per the format string. '*t' returns a table.",
|
|
543
|
+
"type": "function"
|
|
544
|
+
},
|
|
545
|
+
"difftime": {
|
|
546
|
+
"signature": "os.difftime(t2, t1)",
|
|
547
|
+
"description": "Returns the difference in seconds between times t2 and t1.",
|
|
548
|
+
"type": "function"
|
|
549
|
+
},
|
|
550
|
+
"execute": {
|
|
551
|
+
"signature": "os.execute([command])",
|
|
552
|
+
"description": "Passes command to the OS shell. Returns true/nil, exit type, and exit code (Lua 5.2+). In 5.1 returns a status code.",
|
|
553
|
+
"type": "function"
|
|
554
|
+
},
|
|
555
|
+
"exit": {
|
|
556
|
+
"signature": "os.exit([code [, close]])",
|
|
557
|
+
"description": "Calls the C exit function. code defaults to true (success). If close is true, closes the Lua state first (5.2+).",
|
|
558
|
+
"type": "function"
|
|
559
|
+
},
|
|
560
|
+
"getenv": {
|
|
561
|
+
"signature": "os.getenv(varname)",
|
|
562
|
+
"description": "Returns the value of the environment variable varname, or nil.",
|
|
563
|
+
"type": "function"
|
|
564
|
+
},
|
|
565
|
+
"remove": {
|
|
566
|
+
"signature": "os.remove(filename)",
|
|
567
|
+
"description": "Deletes the file with the given name. Returns true on success, or nil plus error message.",
|
|
568
|
+
"type": "function"
|
|
569
|
+
},
|
|
570
|
+
"rename": {
|
|
571
|
+
"signature": "os.rename(oldname, newname)",
|
|
572
|
+
"description": "Renames a file or directory. Returns true on success, or nil plus error message.",
|
|
573
|
+
"type": "function"
|
|
574
|
+
},
|
|
575
|
+
"tmpname": {
|
|
576
|
+
"signature": "os.tmpname()",
|
|
577
|
+
"description": "Returns a string with a file name for use as a temporary file.",
|
|
578
|
+
"type": "function"
|
|
579
|
+
},
|
|
580
|
+
"setlocale": {
|
|
581
|
+
"signature": "os.setlocale(locale [, category])",
|
|
582
|
+
"description": "Set locale for the program. category: 'all', 'collate', 'ctype', 'monetary', 'numeric', 'time'."
|
|
583
|
+
}
|
|
107
584
|
}
|
|
108
585
|
},
|
|
109
586
|
"coroutine": {
|
|
110
587
|
"signature": "coroutine library",
|
|
111
|
-
"description": "
|
|
588
|
+
"description": "Provides functions for creating and managing coroutines (cooperative multithreading).",
|
|
112
589
|
"type": "module",
|
|
113
590
|
"module": "coroutine",
|
|
114
591
|
"members": {
|
|
115
|
-
"create": {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
"
|
|
121
|
-
|
|
592
|
+
"create": {
|
|
593
|
+
"signature": "coroutine.create(f)",
|
|
594
|
+
"description": "Creates a new coroutine with body f (a function). Returns the new coroutine (a thread value).",
|
|
595
|
+
"type": "function"
|
|
596
|
+
},
|
|
597
|
+
"resume": {
|
|
598
|
+
"signature": "coroutine.resume(co [, val1, ···])",
|
|
599
|
+
"description": "Starts or continues execution of coroutine co. Returns true plus yielded/returned values on success, or false plus error.",
|
|
600
|
+
"type": "function"
|
|
601
|
+
},
|
|
602
|
+
"yield": {
|
|
603
|
+
"signature": "coroutine.yield(···)",
|
|
604
|
+
"description": "Suspends the running coroutine. Arguments become the extra results of resume.",
|
|
605
|
+
"type": "function"
|
|
606
|
+
},
|
|
607
|
+
"wrap": {
|
|
608
|
+
"signature": "coroutine.wrap(f)",
|
|
609
|
+
"description": "Creates a coroutine and returns a function that resumes it each time it is called. Raises errors instead of returning false.",
|
|
610
|
+
"type": "function"
|
|
611
|
+
},
|
|
612
|
+
"status": {
|
|
613
|
+
"signature": "coroutine.status(co)",
|
|
614
|
+
"description": "Returns the status of coroutine co: \"running\", \"suspended\", \"normal\", or \"dead\".",
|
|
615
|
+
"type": "function"
|
|
616
|
+
},
|
|
617
|
+
"isyieldable": {
|
|
618
|
+
"signature": "coroutine.isyieldable()",
|
|
619
|
+
"description": "Returns true if the running coroutine can yield (not the main thread and not inside a non-yieldable C function). Lua 5.3+.",
|
|
620
|
+
"type": "function"
|
|
621
|
+
},
|
|
622
|
+
"running": {
|
|
623
|
+
"signature": "coroutine.running()",
|
|
624
|
+
"description": "Returns the running coroutine plus a boolean: true if the running coroutine is the main thread.",
|
|
625
|
+
"type": "function"
|
|
626
|
+
},
|
|
627
|
+
"close": {
|
|
628
|
+
"signature": "coroutine.close(co)",
|
|
629
|
+
"description": "Closes coroutine co, closing all pending to-be-closed variables and putting the coroutine in a dead state. Lua 5.4+.",
|
|
630
|
+
"type": "function"
|
|
631
|
+
}
|
|
122
632
|
}
|
|
123
633
|
},
|
|
124
634
|
"debug": {
|
|
125
635
|
"signature": "debug library",
|
|
126
|
-
"description": "
|
|
636
|
+
"description": "Provides a debug interface. Functions in this library should be used only for debugging and profiling; use with care in production code.",
|
|
127
637
|
"type": "module",
|
|
128
638
|
"module": "debug",
|
|
129
639
|
"members": {
|
|
130
|
-
"
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
"
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
"
|
|
141
|
-
|
|
142
|
-
|
|
640
|
+
"getinfo": {
|
|
641
|
+
"signature": "debug.getinfo([thread,] f [, what])",
|
|
642
|
+
"description": "Returns a table with information about a function. f can be a function or a stack level. 'what' selects which fields to fill.",
|
|
643
|
+
"type": "function"
|
|
644
|
+
},
|
|
645
|
+
"traceback": {
|
|
646
|
+
"signature": "debug.traceback([thread,] [message [, level]])",
|
|
647
|
+
"description": "Returns a string with a traceback of the call stack. An optional message is prepended.",
|
|
648
|
+
"type": "function"
|
|
649
|
+
},
|
|
650
|
+
"sethook": {
|
|
651
|
+
"signature": "debug.sethook([thread,] hook, mask [, count])",
|
|
652
|
+
"description": "Sets the given function as a debug hook. Mask is a string with \"c\" (call), \"r\" (return), \"l\" (line).",
|
|
653
|
+
"type": "function"
|
|
654
|
+
},
|
|
655
|
+
"getlocal": {
|
|
656
|
+
"signature": "debug.getlocal([thread,] f, local)",
|
|
657
|
+
"description": "Returns the name and value of the local variable at index local of function at level f.",
|
|
658
|
+
"type": "function"
|
|
659
|
+
},
|
|
660
|
+
"setlocal": {
|
|
661
|
+
"signature": "debug.setlocal([thread,] level, local, value)",
|
|
662
|
+
"description": "Assigns value to the local variable at index local of function at stack level.",
|
|
663
|
+
"type": "function"
|
|
664
|
+
},
|
|
665
|
+
"getupvalue": {
|
|
666
|
+
"signature": "debug.getupvalue(f, up)",
|
|
667
|
+
"description": "Returns the name and value of the upvalue at index up of function f.",
|
|
668
|
+
"type": "function"
|
|
669
|
+
},
|
|
670
|
+
"setupvalue": {
|
|
671
|
+
"signature": "debug.setupvalue(f, up, value)",
|
|
672
|
+
"description": "Assigns value to the upvalue at index up of function f. Returns the upvalue name or nil.",
|
|
673
|
+
"type": "function"
|
|
674
|
+
},
|
|
675
|
+
"getmetatable": {
|
|
676
|
+
"signature": "debug.getmetatable(value)",
|
|
677
|
+
"description": "Returns the metatable of value without checking __metatable.",
|
|
678
|
+
"type": "function"
|
|
679
|
+
},
|
|
680
|
+
"setmetatable": {
|
|
681
|
+
"signature": "debug.setmetatable(value, table)",
|
|
682
|
+
"description": "Sets the metatable for value to table (can be nil). Returns value.",
|
|
683
|
+
"type": "function"
|
|
684
|
+
},
|
|
685
|
+
"getuservalue": {
|
|
686
|
+
"signature": "debug.getuservalue(u [, n])",
|
|
687
|
+
"description": "Returns the n-th user value associated with userdata u. Lua 5.4 added the n parameter.",
|
|
688
|
+
"type": "function"
|
|
689
|
+
},
|
|
690
|
+
"setuservalue": {
|
|
691
|
+
"signature": "debug.setuservalue(udata, value [, n])",
|
|
692
|
+
"description": "Sets value as the n-th user value associated with userdata. Returns udata.",
|
|
693
|
+
"type": "function"
|
|
694
|
+
},
|
|
695
|
+
"gethook": {
|
|
696
|
+
"signature": "debug.gethook([thread])",
|
|
697
|
+
"description": "Returns current hook function, mask, and count."
|
|
698
|
+
},
|
|
699
|
+
"getregistry": {
|
|
700
|
+
"signature": "debug.getregistry()",
|
|
701
|
+
"description": "Returns the Lua registry table."
|
|
702
|
+
},
|
|
703
|
+
"upvalueid": {
|
|
704
|
+
"signature": "debug.upvalueid(f, n)",
|
|
705
|
+
"description": "Returns unique identifier for upvalue n of function f. (5.2+)"
|
|
706
|
+
},
|
|
707
|
+
"upvaluejoin": {
|
|
708
|
+
"signature": "debug.upvaluejoin(f1, n1, f2, n2)",
|
|
709
|
+
"description": "Makes upvalue n1 of f1 refer to same upvalue as n2 of f2. (5.2+)"
|
|
710
|
+
}
|
|
143
711
|
}
|
|
144
712
|
},
|
|
145
|
-
"
|
|
146
|
-
"signature": "
|
|
147
|
-
"description": "
|
|
148
|
-
"type": "
|
|
149
|
-
"module": "
|
|
713
|
+
"package": {
|
|
714
|
+
"signature": "package library",
|
|
715
|
+
"description": "Provides facilities for loading modules. Used by require to find and load modules.",
|
|
716
|
+
"type": "module",
|
|
717
|
+
"module": "package",
|
|
150
718
|
"members": {
|
|
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
|
-
|
|
719
|
+
"path": {
|
|
720
|
+
"signature": "package.path",
|
|
721
|
+
"description": "A string with the path used by require to search for Lua modules. Uses templates with '?' as the module name placeholder.",
|
|
722
|
+
"type": "field"
|
|
723
|
+
},
|
|
724
|
+
"cpath": {
|
|
725
|
+
"signature": "package.cpath",
|
|
726
|
+
"description": "A string with the path used by require to search for C modules.",
|
|
727
|
+
"type": "field"
|
|
728
|
+
},
|
|
729
|
+
"loaded": {
|
|
730
|
+
"signature": "package.loaded",
|
|
731
|
+
"description": "A table of already-loaded modules. require checks this table first.",
|
|
732
|
+
"type": "field"
|
|
733
|
+
},
|
|
734
|
+
"preload": {
|
|
735
|
+
"signature": "package.preload",
|
|
736
|
+
"description": "A table of loader functions indexed by module name. Checked by require before file searchers.",
|
|
737
|
+
"type": "field"
|
|
738
|
+
},
|
|
739
|
+
"searchers": {
|
|
740
|
+
"signature": "package.searchers",
|
|
741
|
+
"description": "An array of searcher functions used by require to find a module. In Lua 5.1, this is package.loaders.",
|
|
742
|
+
"type": "field"
|
|
743
|
+
},
|
|
744
|
+
"searchpath": {
|
|
745
|
+
"signature": "package.searchpath(name, path [, sep [, rep]])",
|
|
746
|
+
"description": "Searches for the given name in the given path. Returns the first file that can be opened, or nil plus an error.",
|
|
747
|
+
"type": "function"
|
|
748
|
+
},
|
|
749
|
+
"config": {
|
|
750
|
+
"signature": "package.config",
|
|
751
|
+
"description": "A string with compile-time configuration for packages (directory separator, path separator, template wildcard, etc.).",
|
|
752
|
+
"type": "field"
|
|
753
|
+
},
|
|
754
|
+
"loadlib": {
|
|
755
|
+
"signature": "package.loadlib(libname, funcname)",
|
|
756
|
+
"description": "Dynamically links the C library libname and returns funcname as a C function."
|
|
757
|
+
}
|
|
178
758
|
}
|
|
759
|
+
},
|
|
760
|
+
"utf8": {
|
|
761
|
+
"signature": "utf8 library",
|
|
762
|
+
"description": "Provides basic support for UTF-8 encoding. Available in Lua 5.3+.",
|
|
763
|
+
"type": "module",
|
|
764
|
+
"module": "utf8",
|
|
765
|
+
"members": {
|
|
766
|
+
"char": {
|
|
767
|
+
"signature": "utf8.char(···)",
|
|
768
|
+
"description": "Receives zero or more integers and returns a string with each character having the given code point.",
|
|
769
|
+
"type": "function"
|
|
770
|
+
},
|
|
771
|
+
"codepoint": {
|
|
772
|
+
"signature": "utf8.codepoint(s [, i [, j]])",
|
|
773
|
+
"description": "Returns the code points of all characters in s between positions i and j.",
|
|
774
|
+
"type": "function"
|
|
775
|
+
},
|
|
776
|
+
"codes": {
|
|
777
|
+
"signature": "utf8.codes(s)",
|
|
778
|
+
"description": "Returns an iterator yielding (position, codepoint) for each UTF-8 character in s.",
|
|
779
|
+
"type": "function"
|
|
780
|
+
},
|
|
781
|
+
"len": {
|
|
782
|
+
"signature": "utf8.len(s [, i [, j]])",
|
|
783
|
+
"description": "Returns the number of UTF-8 characters in s between positions i and j. Returns nil plus error position if invalid UTF-8.",
|
|
784
|
+
"type": "function"
|
|
785
|
+
},
|
|
786
|
+
"offset": {
|
|
787
|
+
"signature": "utf8.offset(s, n [, i])",
|
|
788
|
+
"description": "Returns the byte position where the n-th UTF-8 character starts (counting from position i).",
|
|
789
|
+
"type": "function"
|
|
790
|
+
},
|
|
791
|
+
"charpattern": {
|
|
792
|
+
"signature": "utf8.charpattern",
|
|
793
|
+
"description": "The pattern \"[\\0-\\x7F\\xC2-\\xFD][\\x80-\\xBF]*\" which matches exactly one UTF-8 byte sequence.",
|
|
794
|
+
"type": "field"
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
},
|
|
798
|
+
"and": {
|
|
799
|
+
"signature": "and",
|
|
800
|
+
"description": "Logical AND operator. Returns the first false argument or the last argument. Short-circuit evaluation.",
|
|
801
|
+
"type": "keyword",
|
|
802
|
+
"module": "builtin"
|
|
803
|
+
},
|
|
804
|
+
"break": {
|
|
805
|
+
"signature": "break",
|
|
806
|
+
"description": "Terminates the execution of the innermost while, repeat, or for loop.",
|
|
807
|
+
"type": "keyword",
|
|
808
|
+
"module": "builtin"
|
|
809
|
+
},
|
|
810
|
+
"do": {
|
|
811
|
+
"signature": "do",
|
|
812
|
+
"description": "Starts a block of code. Paired with 'end'.",
|
|
813
|
+
"type": "keyword",
|
|
814
|
+
"module": "builtin"
|
|
815
|
+
},
|
|
816
|
+
"else": {
|
|
817
|
+
"signature": "else",
|
|
818
|
+
"description": "Alternative branch in an if statement.",
|
|
819
|
+
"type": "keyword",
|
|
820
|
+
"module": "builtin"
|
|
821
|
+
},
|
|
822
|
+
"elseif": {
|
|
823
|
+
"signature": "elseif",
|
|
824
|
+
"description": "Additional conditional branch in an if statement. Avoids nesting.",
|
|
825
|
+
"type": "keyword",
|
|
826
|
+
"module": "builtin"
|
|
827
|
+
},
|
|
828
|
+
"end": {
|
|
829
|
+
"signature": "end",
|
|
830
|
+
"description": "Closes a block started by function, if, for, while, repeat, or do.",
|
|
831
|
+
"type": "keyword",
|
|
832
|
+
"module": "builtin"
|
|
833
|
+
},
|
|
834
|
+
"false": {
|
|
835
|
+
"signature": "false",
|
|
836
|
+
"description": "Boolean false value. Together with nil, is the only falsy value in Lua.",
|
|
837
|
+
"type": "keyword",
|
|
838
|
+
"module": "builtin"
|
|
839
|
+
},
|
|
840
|
+
"for": {
|
|
841
|
+
"signature": "for",
|
|
842
|
+
"description": "Starts a for loop, either numeric (for i = a, b, c) or generic (for k, v in iter).",
|
|
843
|
+
"type": "keyword",
|
|
844
|
+
"module": "builtin"
|
|
845
|
+
},
|
|
846
|
+
"function": {
|
|
847
|
+
"signature": "function",
|
|
848
|
+
"description": "Declares a function. Can be used as a statement or an expression.",
|
|
849
|
+
"type": "keyword",
|
|
850
|
+
"module": "builtin"
|
|
851
|
+
},
|
|
852
|
+
"goto": {
|
|
853
|
+
"signature": "goto",
|
|
854
|
+
"description": "Unconditional jump to a label. Available in Lua 5.2+.",
|
|
855
|
+
"type": "keyword",
|
|
856
|
+
"module": "builtin"
|
|
857
|
+
},
|
|
858
|
+
"if": {
|
|
859
|
+
"signature": "if",
|
|
860
|
+
"description": "Starts a conditional statement.",
|
|
861
|
+
"type": "keyword",
|
|
862
|
+
"module": "builtin"
|
|
863
|
+
},
|
|
864
|
+
"in": {
|
|
865
|
+
"signature": "in",
|
|
866
|
+
"description": "Used in generic for loops: for k, v in iterator do ... end.",
|
|
867
|
+
"type": "keyword",
|
|
868
|
+
"module": "builtin"
|
|
869
|
+
},
|
|
870
|
+
"local": {
|
|
871
|
+
"signature": "local",
|
|
872
|
+
"description": "Declares a local variable or function, scoped to the enclosing block.",
|
|
873
|
+
"type": "keyword",
|
|
874
|
+
"module": "builtin"
|
|
875
|
+
},
|
|
876
|
+
"nil": {
|
|
877
|
+
"signature": "nil",
|
|
878
|
+
"description": "The type nil has one value: nil. Represents the absence of a useful value.",
|
|
879
|
+
"type": "keyword",
|
|
880
|
+
"module": "builtin"
|
|
881
|
+
},
|
|
882
|
+
"not": {
|
|
883
|
+
"signature": "not",
|
|
884
|
+
"description": "Logical NOT operator. Returns true if argument is false or nil, otherwise false.",
|
|
885
|
+
"type": "keyword",
|
|
886
|
+
"module": "builtin"
|
|
887
|
+
},
|
|
888
|
+
"or": {
|
|
889
|
+
"signature": "or",
|
|
890
|
+
"description": "Logical OR operator. Returns the first true argument or the last argument. Short-circuit evaluation.",
|
|
891
|
+
"type": "keyword",
|
|
892
|
+
"module": "builtin"
|
|
893
|
+
},
|
|
894
|
+
"repeat": {
|
|
895
|
+
"signature": "repeat",
|
|
896
|
+
"description": "Starts a repeat-until loop, which executes at least once.",
|
|
897
|
+
"type": "keyword",
|
|
898
|
+
"module": "builtin"
|
|
899
|
+
},
|
|
900
|
+
"return": {
|
|
901
|
+
"signature": "return",
|
|
902
|
+
"description": "Returns values from a function. Must be the last statement in a block.",
|
|
903
|
+
"type": "keyword",
|
|
904
|
+
"module": "builtin"
|
|
905
|
+
},
|
|
906
|
+
"then": {
|
|
907
|
+
"signature": "then",
|
|
908
|
+
"description": "Required after the condition in an if or elseif clause.",
|
|
909
|
+
"type": "keyword",
|
|
910
|
+
"module": "builtin"
|
|
911
|
+
},
|
|
912
|
+
"true": {
|
|
913
|
+
"signature": "true",
|
|
914
|
+
"description": "Boolean true value.",
|
|
915
|
+
"type": "keyword",
|
|
916
|
+
"module": "builtin"
|
|
917
|
+
},
|
|
918
|
+
"until": {
|
|
919
|
+
"signature": "until",
|
|
920
|
+
"description": "Ends a repeat-until loop. The condition is tested after each iteration.",
|
|
921
|
+
"type": "keyword",
|
|
922
|
+
"module": "builtin"
|
|
923
|
+
},
|
|
924
|
+
"while": {
|
|
925
|
+
"signature": "while",
|
|
926
|
+
"description": "Starts a while loop that repeats while a condition is true.",
|
|
927
|
+
"type": "keyword",
|
|
928
|
+
"module": "builtin"
|
|
179
929
|
}
|
|
180
930
|
}
|
|
181
|
-
}
|
|
931
|
+
}
|