diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-26 16:51:02 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-26 16:51:02 +0800 |
commit | 05aabcc4c4f731bd7df2bcee03d1d51fda6aab45 (patch) | |
tree | edc3eca01d39630c2df1230f1a1251691c74bfef /server | |
parent | e13cadbd01e6f7e80c9bd02553d373d2136dec19 (diff) | |
download | lua-language-server-05aabcc4c4f731bd7df2bcee03d1d51fda6aab45.zip |
过滤掉特殊名字
Diffstat (limited to 'server')
-rw-r--r-- | server/src/matcher/diagnostics.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/src/matcher/diagnostics.lua b/server/src/matcher/diagnostics.lua index 9fc26ada..584a0cb5 100644 --- a/server/src/matcher/diagnostics.lua +++ b/server/src/matcher/diagnostics.lua @@ -5,6 +5,7 @@ local function searchUnusedLocals(results, callback) if var.key == 'self' or var.key == '_' or var.key == '_ENV' + or var.key == '' then goto NEXT_VAR end @@ -33,7 +34,7 @@ local function searchUndefinedGlobal(results, callback) goto NEXT_VAR end local lIndex = index:lower() - if lIndex == 'log' or lIndex == 'arg' then + if lIndex == 'log' or lIndex == 'arg' or lIndex == '' then goto NEXT_VAR end if not index:find '%l' then @@ -117,6 +118,7 @@ local function searchRedefinition(results, uri, callback) for _, var in ipairs(results.locals) do if var.key == '_' or var.key == '_ENV' + or var.key == '' then goto NEXT_VAR end |