summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.vscode/launch.json2
-rw-r--r--script-beta/parser/compile.lua9
-rw-r--r--script-beta/vm/getLibrary.lua6
3 files changed, 16 insertions, 1 deletions
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 0e1fa7d8..62923b5d 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -48,7 +48,7 @@
"type": "lua",
"request": "attach",
"stopOnEntry": true,
- "address": "127.0.0.1:11409",
+ "address": "127.0.0.1:11427",
"outputCapture": [
]
},
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)
diff --git a/script-beta/vm/getLibrary.lua b/script-beta/vm/getLibrary.lua
index 86f1ae58..eaeeafa3 100644
--- a/script-beta/vm/getLibrary.lua
+++ b/script-beta/vm/getLibrary.lua
@@ -60,6 +60,12 @@ function vm.getLibraryName(source, deep)
if lib then
return lib.name
end
+ local defs = vm.getDefs(source, deep)
+ for _, def in ipairs(defs) do
+ if def.special then
+ return def.special
+ end
+ end
return nil
end