summaryrefslogtreecommitdiff
path: root/script/vm/global.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-11-03 17:20:30 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-11-03 17:20:30 +0800
commit45ba0743c75d0f2b68765db0240f150681808205 (patch)
tree7dc6c8f4e4ca776abc6c87cc80b9859f3c08d17d /script/vm/global.lua
parent213f5176ff3125feab1e743ef57abba0e18a44a5 (diff)
downloadlua-language-server-45ba0743c75d0f2b68765db0240f150681808205.zip
support `self` type
#1505
Diffstat (limited to 'script/vm/global.lua')
-rw-r--r--script/vm/global.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script/vm/global.lua b/script/vm/global.lua
index e94f9239..027b096a 100644
--- a/script/vm/global.lua
+++ b/script/vm/global.lua
@@ -404,6 +404,9 @@ local compilerGlobalSwitch = util.switch()
if name == '_' then
return
end
+ if name == 'self' then
+ return
+ end
local type = vm.declareGlobal('type', name, uri)
type:addGet(uri, source)
source._globalNode = type