diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-01-23 13:19:37 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-01-23 13:19:37 +0800 |
commit | db846579d49e2357967627f78e2269327f88511b (patch) | |
tree | 687537340ee3e3f0c992604cb8433f2e2251274f /script-beta/vm | |
parent | a781c60eb931a24f9bc6b833049277c7ee72a546 (diff) | |
download | lua-language-server-db846579d49e2357967627f78e2269327f88511b.zip |
整理代码
Diffstat (limited to 'script-beta/vm')
-rw-r--r-- | script-beta/vm/eachField.lua | 16 | ||||
-rw-r--r-- | script-beta/vm/getMeta.lua | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/script-beta/vm/eachField.lua b/script-beta/vm/eachField.lua index 2d464ba3..656d6fe7 100644 --- a/script-beta/vm/eachField.lua +++ b/script-beta/vm/eachField.lua @@ -35,7 +35,7 @@ local function ofENV(source, callback) callback(ref) if guide.getName(ref) == '_G' then checkNext(ref, callback) - vm.checkMeta(ref, callback) + vm.checkMetaValue(ref, callback) local call, index = vm.getArgInfo(ref) local special = vm.getSpecial(call) if (special == 'rawset' or special == 'rawget') @@ -45,7 +45,7 @@ local function ofENV(source, callback) end elseif ref.type == 'getlocal' then checkNext(ref, callback) - vm.checkMeta(ref, callback) + vm.checkMetaValue(ref, callback) end vm.eachFieldInTable(ref.value, callback) end @@ -56,9 +56,9 @@ local function ofLocal(source, callback) ofENV(source, callback) else vm.eachRef(source, function (src) - vm.eachFieldInTable(src.value, callback) checkNext(src, callback) - vm.checkMeta(src, callback) + vm.checkMetaValue(src, callback) + vm.eachFieldInTable(src.value, callback) end) end end @@ -66,7 +66,7 @@ end local function ofGlobal(source, callback) vm.eachRef(source, function (src) checkNext(src, callback) - vm.checkMeta(src, callback) + vm.checkMetaValue(src, callback) vm.eachFieldInTable(src.value, callback) end) end @@ -74,7 +74,7 @@ end local function ofGetField(source, callback) vm.eachRef(source, function (src) checkNext(src, callback) - vm.checkMeta(src, callback) + vm.checkMetaValue(src, callback) vm.eachFieldInTable(src.value, callback) end) end @@ -91,7 +91,7 @@ end local function ofTableField(source, callback) vm.eachRef(source, function (src) checkNext(src, callback) - vm.checkMeta(src, callback) + vm.checkMetaValue(src, callback) end) end @@ -107,7 +107,7 @@ function vm.eachFieldInTable(value, callback) if field.type == 'tablefield' or field.type == 'tableindex' then callback(field) - vm.checkMeta(field, callback) + vm.checkMetaValue(field, callback) end end end diff --git a/script-beta/vm/getMeta.lua b/script-beta/vm/getMeta.lua index 12bfa4b3..5bb341b2 100644 --- a/script-beta/vm/getMeta.lua +++ b/script-beta/vm/getMeta.lua @@ -45,7 +45,7 @@ local function checkMetaRecv(source, callback) end end -function vm.checkMeta(source, callback) +function vm.checkMetaValue(source, callback) checkMetaArg1(source, callback) checkMetaRecv(source.value, callback) end |