Skip to content

Commit 03b17aa

Browse files
committed
cleanup
1 parent e44142d commit 03b17aa

File tree

3 files changed

+6
-21
lines changed

3 files changed

+6
-21
lines changed

script/core/infer.lua

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,6 @@ local TypeSort = {
2020
['nil'] = 999,
2121
}
2222

23-
local innerTypeMap = {
24-
['unknown'] = true,
25-
['any'] = true,
26-
['nil'] = true,
27-
['boolean'] = true,
28-
['number'] = true,
29-
['integer'] = true,
30-
['thread'] = true,
31-
['table'] = true,
32-
['string'] = true,
33-
['userdata'] = true,
34-
['lightuserdata'] = true,
35-
['function'] = true,
36-
}
37-
3823
local m = {}
3924

4025
local function mergeTable(a, b)
@@ -663,8 +648,4 @@ function m.getClass(source)
663648
return view
664649
end
665650

666-
function m.isInnerType(typeName)
667-
return innerTypeMap[typeName] == true
668-
end
669-
670651
return m

script/proto/define.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ m.BuiltIn = {
260260
['utf8'] = 'default',
261261
}
262262

263-
m.BuiltinClass = {
263+
m.BuiltinType = {
264264
['unknown'] = true,
265265
['any'] = true,
266266
['nil'] = true,

script/vm/getDocs.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function vm.getDocDefines(name)
4545
end
4646

4747
function vm.isDocDefined(name)
48-
if define.BuiltinClass[name] then
48+
if define.BuiltinType[name] then
4949
return true
5050
end
5151
local id = 'def:dn:' .. name
@@ -55,6 +55,10 @@ function vm.isDocDefined(name)
5555
return false
5656
end
5757

58+
function vm.isBuiltinType(name)
59+
return define.BuiltinType[name] == true
60+
end
61+
5862
function vm.getDocEnums(doc)
5963
if not doc then
6064
return nil

0 commit comments

Comments
 (0)