summaryrefslogtreecommitdiff
path: root/server/src/parser/lines.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-08 19:13:50 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-08 19:13:50 +0800
commit2a8a23aec9cceec42f288750b3ed19ec8bd23fc7 (patch)
treea9cb5d3430c422a0e26035150c45a4732cf2e631 /server/src/parser/lines.lua
parentb7217e6433587f7be77660f05f1b0257aeab02c8 (diff)
downloadlua-language-server-2a8a23aec9cceec42f288750b3ed19ec8bd23fc7.zip
不用每次指定编码了
Diffstat (limited to 'server/src/parser/lines.lua')
-rw-r--r--server/src/parser/lines.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/src/parser/lines.lua b/server/src/parser/lines.lua
index 88966bda..e3b51aa2 100644
--- a/server/src/parser/lines.lua
+++ b/server/src/parser/lines.lua
@@ -142,12 +142,13 @@ function mt:set_code(code)
self.code = code
end
-return function (self, buf)
+return function (self, buf, code)
local lines, err = parser:match(buf)
if not lines then
return nil, err
end
lines.buf = buf
+ lines.code = code
return setmetatable(lines, mt)
end