summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-09-29 19:48:33 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-09-29 19:48:33 +0800
commit1721f5c185547b8074060a95f526f2f4b630969b (patch)
tree433564a247be30d5cec566ad6e321b66b25ae10d /script
parenta1b6609295c5d4a281cad9b68f0c098d9bbd8f48 (diff)
downloadlua-language-server-1721f5c185547b8074060a95f526f2f4b630969b.zip
#693
Diffstat (limited to 'script')
-rw-r--r--script/core/infer.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/script/core/infer.lua b/script/core/infer.lua
index 997df9a3..b42859c6 100644
--- a/script/core/infer.lua
+++ b/script/core/infer.lua
@@ -20,6 +20,21 @@ 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)
@@ -648,4 +663,8 @@ function m.getClass(source)
return view
end
+function m.isInnerType(typeName)
+ return innerTypeMap[typeName] == true
+end
+
return m