summaryrefslogtreecommitdiff
path: root/script-beta/vm/vm.lua
diff options
context:
space:
mode:
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