diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-11-21 20:06:20 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-11-21 20:06:20 +0800 |
commit | bafe0e44914ad3b669388b94b91d9992edeb8e07 (patch) | |
tree | 26f78a3934dc38d31f82bbf9b33975dfecb3a0d8 /server-beta/src/vm | |
parent | c354b5e8bd05ba117857ac93e8d647980875d98d (diff) | |
download | lua-language-server-bafe0e44914ad3b669388b94b91d9992edeb8e07.zip |
hover的第一步
Diffstat (limited to 'server-beta/src/vm')
-rw-r--r-- | server-beta/src/vm/eachRef.lua | 4 | ||||
-rw-r--r-- | server-beta/src/vm/getLibrary.lua | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/server-beta/src/vm/eachRef.lua b/server-beta/src/vm/eachRef.lua index 543a0c09..465b1267 100644 --- a/server-beta/src/vm/eachRef.lua +++ b/server-beta/src/vm/eachRef.lua @@ -163,7 +163,7 @@ end local function asValue(source, callback) local parent = source.parent if parent and parent.value == source then - if guide.getKeyString(parent) == '__index' then + if guide.getName(parent) == '__index' then if parent.type == 'tablefield' or parent.type == 'tableindex' then local t = parent.parent @@ -274,7 +274,7 @@ local function ofLocal(loc, callback) end end elseif ref.type == 'getglobal' then - if guide.getKeyString(ref) == '_G' then + if guide.getName(ref) == '_G' then callback { source = ref, mode = 'get', diff --git a/server-beta/src/vm/getLibrary.lua b/server-beta/src/vm/getLibrary.lua index d2645790..fd05347e 100644 --- a/server-beta/src/vm/getLibrary.lua +++ b/server-beta/src/vm/getLibrary.lua @@ -20,7 +20,7 @@ local function getLibInNode(source, nodeLib) if not nodeLib.child then return nil end - local key = guide.getKeyString(source) + local key = guide.getName(source) local defLib = nodeLib.child[key] return defLib end |