summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script/core/infer.lua19
-rw-r--r--script/proto/define.lua2
-rw-r--r--script/vm/getDocs.lua6
3 files changed, 6 insertions, 21 deletions
diff --git a/script/core/infer.lua b/script/core/infer.lua
index b42859c6..997df9a3 100644
--- a/script/core/infer.lua
+++ b/script/core/infer.lua
@@ -20,21 +20,6 @@ local TypeSort = {
['nil'] = 999,
}
-local innerTypeMap = {
- ['unknown'] = true,
- ['any'] = true,
- ['nil'] = true,
- ['boolean'] = true,
- ['number'] = true,
- ['integer'] = true,
- ['thread'] = true,
- ['table'] = true,
- ['string'] = true,
- ['userdata'] = true,
- ['lightuserdata'] = true,
- ['function'] = true,
-}
-
local m = {}
local function mergeTable(a, b)
@@ -663,8 +648,4 @@ function m.getClass(source)
return view
end
-function m.isInnerType(typeName)
- return innerTypeMap[typeName] == true
-end
-
return m
diff --git a/script/proto/define.lua b/script/proto/define.lua
index 825e757c..f14117ab 100644
--- a/script/proto/define.lua
+++ b/script/proto/define.lua
@@ -260,7 +260,7 @@ m.BuiltIn = {
['utf8'] = 'default',
}
-m.BuiltinClass = {
+m.BuiltinType = {
['unknown'] = true,
['any'] = true,
['nil'] = true,
diff --git a/script/vm/getDocs.lua b/script/vm/getDocs.lua
index 0c6b1695..2fb2bda9 100644
--- a/script/vm/getDocs.lua
+++ b/script/vm/getDocs.lua
@@ -45,7 +45,7 @@ function vm.getDocDefines(name)
end
function vm.isDocDefined(name)
- if define.BuiltinClass[name] then
+ if define.BuiltinType[name] then
return true
end
local id = 'def:dn:' .. name
@@ -55,6 +55,10 @@ function vm.isDocDefined(name)
return false
end
+function vm.isBuiltinType(name)
+ return define.BuiltinType[name] == true
+end
+
function vm.getDocEnums(doc)
if not doc then
return nil