diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-10-12 16:24:08 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-10-12 16:24:08 +0800 |
commit | bb99b0f6005262e9dd2d534bbddab6112f3127c5 (patch) | |
tree | 9a050fe496d3bdbb783944409f2788c7ebebf68b /script-beta/parser/guide.lua | |
parent | 822085b97a278ddb6751ae7c7953c1700c3b493e (diff) | |
download | lua-language-server-bb99b0f6005262e9dd2d534bbddab6112f3127c5.zip |
修正一些错误
Diffstat (limited to 'script-beta/parser/guide.lua')
-rw-r--r-- | script-beta/parser/guide.lua | 5 |
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 |