summaryrefslogtreecommitdiff
path: root/script-beta/parser/compile.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-11-16 14:18:48 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-11-16 14:18:48 +0800
commit45b8a1d0cb6e0a7fc160a4fc0a4a47469bbac1d4 (patch)
tree3109b50ca330517383958a444867a673de40f7ac /script-beta/parser/compile.lua
parent7e97893e92f694b65f58630cba04d0732ca75e23 (diff)
downloadlua-language-server-45b8a1d0cb6e0a7fc160a4fc0a4a47469bbac1d4.zip
支持将自定义函数识别为special
Diffstat (limited to 'script-beta/parser/compile.lua')
-rw-r--r--script-beta/parser/compile.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/script-beta/parser/compile.lua b/script-beta/parser/compile.lua
index f2a78c28..2c7172e8 100644
--- a/script-beta/parser/compile.lua
+++ b/script-beta/parser/compile.lua
@@ -212,6 +212,15 @@ local vmMap = {
if node then
addRef(node, obj)
end
+ local name = obj[1]
+ if specials[name] then
+ addSpecial(name, obj)
+ elseif Options and Options.special then
+ local asName = Options.special[name]
+ if specials[asName] then
+ addSpecial(asName, obj)
+ end
+ end
end
end,
['local'] = function (obj)