diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-09-20 16:13:53 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-09-20 16:13:53 +0800 |
commit | 665af3bd3d2c7e51b2b23336446eb04d5de2e060 (patch) | |
tree | a297a41989eb4ccf2c0872ef2a540212188979d9 /server-beta/src/parser | |
parent | 14fd68e06334352a9a7247b3d5bd9ba4259229a9 (diff) | |
download | lua-language-server-665af3bd3d2c7e51b2b23336446eb04d5de2e060.zip |
编译任务
Diffstat (limited to 'server-beta/src/parser')
-rw-r--r-- | server-beta/src/parser/compile.lua | 6 | ||||
-rw-r--r-- | server-beta/src/parser/parse.lua | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/server-beta/src/parser/compile.lua b/server-beta/src/parser/compile.lua index f6efb6e1..0e6b4848 100644 --- a/server-beta/src/parser/compile.lua +++ b/server-beta/src/parser/compile.lua @@ -556,9 +556,9 @@ local function PostCompile() end return function (self, lua, mode, version) - local state, errs = self:parse(lua, mode, version) + local state, err = self:parse(lua, mode, version) if not state then - return errs + return nil, err end pushError = state.pushError Root = state.root @@ -570,5 +570,5 @@ return function (self, lua, mode, version) PostCompile() state.ast = nil Cache = nil - return state, errs + return state end diff --git a/server-beta/src/parser/parse.lua b/server-beta/src/parser/parse.lua index cec946c0..0fd64e80 100644 --- a/server-beta/src/parser/parse.lua +++ b/server-beta/src/parser/parse.lua @@ -7,6 +7,7 @@ return function (self, lua, mode, version) lua = lua, emmy = {}, root = {}, + errs = errs, pushError = function (err) if err.finish < err.start then err.finish = err.start @@ -30,8 +31,7 @@ return function (self, lua, mode, version) end if not res then state.pushError(err) - return nil, errs end state.ast = res - return state, errs + return state end |