From 262def33acf15a611ccd1ae777e33b7a07d7977a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 29 Nov 2018 18:22:01 +0800 Subject: =?UTF-8?q?=E4=B8=8D=E5=9C=A8=E6=97=A5=E5=BF=97=E4=B8=AD=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E8=AF=AD=E6=B3=95=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/lsp.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'server/src') diff --git a/server/src/lsp.lua b/server/src/lsp.lua index c557d480..0784ae04 100644 --- a/server/src/lsp.lua +++ b/server/src/lsp.lua @@ -121,11 +121,13 @@ function mt:_buildTextCache() 耗时:[%.3f]秒\n\z 数量:[%d]\n\z 总大小:[%.3f]kb\n\z - 速度:[%.3f]kb/s'):format( + 速度:[%.3f]kb/s\n\z + 内存:[%.3f]kb'):format( passed, #list, size / 1000, - size / passed / 1000 + size / passed / 1000, + collectgarbage 'count' )) end @@ -174,15 +176,15 @@ end function mt:compileText(uri) local obj = self._file[uri] if not obj then - return + return nil end if not self._need_compile[uri] then - return + return nil end self._need_compile[uri] = nil local ast, err = parser:ast(obj.text) if not ast then - log.error(err[1].err) + return nil end obj.ast = ast obj.lines = parser:lines(obj.text) -- cgit v1.2.3