summaryrefslogtreecommitdiff
path: root/script-beta/parser
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-10-12 16:24:08 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-10-12 16:24:08 +0800
commitbb99b0f6005262e9dd2d534bbddab6112f3127c5 (patch)
tree9a050fe496d3bdbb783944409f2788c7ebebf68b /script-beta/parser
parent822085b97a278ddb6751ae7c7953c1700c3b493e (diff)
downloadlua-language-server-bb99b0f6005262e9dd2d534bbddab6112f3127c5.zip
修正一些错误
Diffstat (limited to 'script-beta/parser')
-rw-r--r--script-beta/parser/guide.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/script-beta/parser/guide.lua b/script-beta/parser/guide.lua
index 57d2d402..afd763bf 100644
--- a/script-beta/parser/guide.lua
+++ b/script-beta/parser/guide.lua
@@ -610,7 +610,7 @@ function m.getKeyNameOfLiteral(obj)
if s then
return 's|' .. s
else
- return s
+ return 's'
end
elseif tp == 'number' then
local n = obj[1]
@@ -631,6 +631,9 @@ function m.getKeyNameOfLiteral(obj)
end
function m.getKeyName(obj)
+ if not obj then
+ return nil
+ end
local tp = obj.type
if tp == 'getglobal'
or tp == 'setglobal' then