From d64ec162e683c42befb2d32ae31b024e4d4a5510 Mon Sep 17 00:00:00 2001 From: sumneko Date: Sun, 5 May 2019 20:16:08 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=AA=E5=AE=8C=E6=88=90function?= =?UTF-8?q?=E5=9C=A8=E6=96=87=E4=BB=B6=E7=AC=A6=E5=8F=B7=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E8=A1=A8=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/core/document_symbol.lua | 6 ------ server/src/parser/ast.lua | 12 ++++++------ 2 files changed, 6 insertions(+), 12 deletions(-) (limited to 'server/src') diff --git a/server/src/core/document_symbol.lua b/server/src/core/document_symbol.lua index 3c349246..48e01332 100644 --- a/server/src/core/document_symbol.lua +++ b/server/src/core/document_symbol.lua @@ -141,9 +141,6 @@ local function buildLocalFunction(vm, source, used, callback) return end local name = getName(source.name) - if name == '' then - return - end local hvr = hoverFunction(name, value:getFunction()) if not hvr then return @@ -169,9 +166,6 @@ local function buildFunction(vm, source, used, callback) return end local name = getName(source.name) - if name == '' then - return - end local func = value:getFunction() if not func then return diff --git a/server/src/parser/ast.lua b/server/src/parser/ast.lua index bf8f5dab..f361021b 100644 --- a/server/src/parser/ast.lua +++ b/server/src/parser/ast.lua @@ -738,8 +738,8 @@ local Defs = { local last = args[max] pushError { type = 'MISS_NAME', - start = last+1, - finish = last+1, + start = last, + finish = last, } end if #list == 0 then @@ -1276,13 +1276,13 @@ local Defs = { DirtyName = function (pos) pushError { type = 'MISS_NAME', - start = pos, - finish = pos, + start = pos-1, + finish = pos-1, } return { type = 'name', - start = pos, - finish = pos, + start = pos-1, + finish = pos-1, [1] = '' } end, -- cgit v1.2.3