summaryrefslogtreecommitdiff
path: root/script-beta/vm/vm.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-05-29 16:45:03 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-05-29 16:45:03 +0800
commitbf15a6d9e9e3ea5e86596cd84ff4e3b4f12e29f9 (patch)
treedb51d275388a273466190fca6d9e19771507286e /script-beta/vm/vm.lua
parent59afbeaed024d2610d4f514d9c1255e3394008c9 (diff)
downloadlua-language-server-bf15a6d9e9e3ea5e86596cd84ff4e3b4f12e29f9.zip
更新中
Diffstat (limited to 'script-beta/vm/vm.lua')
-rw-r--r--script-beta/vm/vm.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/script-beta/vm/vm.lua b/script-beta/vm/vm.lua
index f68ce6ca..556de3df 100644
--- a/script-beta/vm/vm.lua
+++ b/script-beta/vm/vm.lua
@@ -80,6 +80,24 @@ function m.isSet(src)
return false
end
+function m.isGet(src)
+ local tp = src.type
+ if tp == 'getglobal'
+ or tp == 'getlocal'
+ or tp == 'getfield'
+ or tp == 'getmethod'
+ or tp == 'getindex' then
+ return true
+ end
+ if tp == 'call' then
+ local special = m.getSpecial(src.node)
+ if special == 'rawget' then
+ return true
+ end
+ end
+ return false
+end
+
function m.getArgInfo(source)
local callargs = source.parent
if not callargs or callargs.type ~= 'callargs' then