summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-09 15:25:06 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-09 15:25:06 +0800
commiteaed7673a1ff4e167afa6cc568f714931cf370d6 (patch)
treeee6d768ffb2440e6f40162196c1c154aa2e85456 /server
parentf76813d8a2e4ae3204b549259fe714806807e03d (diff)
downloadlua-language-server-eaed7673a1ff4e167afa6cc568f714931cf370d6.zip
更新一下命名
Diffstat (limited to 'server')
-rw-r--r--server/libs/bee/filesystem.lni5
-rw-r--r--server/libs/lua53/io.lni33
-rw-r--r--server/src/matcher/compile.lua3
-rw-r--r--server/test/find_lib/init.lua2
4 files changed, 37 insertions, 6 deletions
diff --git a/server/libs/bee/filesystem.lni b/server/libs/bee/filesystem.lni
index 99f2c4de..024787ee 100644
--- a/server/libs/bee/filesystem.lni
+++ b/server/libs/bee/filesystem.lni
@@ -3,6 +3,7 @@ type = 'table'
[[.source]]
type = 'library'
name = 'bee.filesystem'
+nick = 'bee::filesystem'
[default]
type = 'function'
@@ -14,8 +15,8 @@ nick = 'fs'
[current_path]
[[.args]]
name = 'new_path'
-type = '*filesystem'
+type = '*bee::filesystem'
optional = 'self'
[[.returns]]
-type = '*filesystem'
+type = '*bee::filesystem'
optional = 'self'
diff --git a/server/libs/lua53/io.lni b/server/libs/lua53/io.lni
index d18055d2..4bd37315 100644
--- a/server/libs/lua53/io.lni
+++ b/server/libs/lua53/io.lni
@@ -1,5 +1,34 @@
+[io]
+type = 'table'
+[[.source]]
+type = 'global'
+[[.source]]
+type = 'library'
+name = 'io'
+
[default]
type = 'function'
+[[.parent]]
+type = 'global'
+name = 'io'
+[[.parent]]
+type = 'library'
+name = 'io'
-[io]
-type = 'table'
+[stdin]
+type = '*FILE*'
+
+[close]
+[[.parent]]
+type = 'global'
+name = 'table'
+[[.parent]]
+type = 'library'
+name = 'table'
+[[.parent]]
+type = 'object'
+name = '*FILE*'
+[[.args]]
+type = '*FILE*'
+name = 'file'
+optional = 'self'
diff --git a/server/src/matcher/compile.lua b/server/src/matcher/compile.lua
index 7db5ad4b..557f4f59 100644
--- a/server/src/matcher/compile.lua
+++ b/server/src/matcher/compile.lua
@@ -271,6 +271,7 @@ function mt:getString(exp)
return {
type = 'string',
string = exp[1],
+ valuetype = 'string',
childs = {},
}
end
@@ -310,7 +311,7 @@ function mt:setValue(var, value)
if not var or not value then
return
end
- var.value = value.value or value
+ var.value = value.value or value
if value.childs then
var.childs = value.childs
for _, child in pairs(value.childs) do
diff --git a/server/test/find_lib/init.lua b/server/test/find_lib/init.lua
index e317c500..f8d7f115 100644
--- a/server/test/find_lib/init.lua
+++ b/server/test/find_lib/init.lua
@@ -92,7 +92,7 @@ TEST '*string:sub' [[
('xxx').<?sub?> = 1
]]
-TEST 'filesystem' [[
+TEST 'bee::filesystem' [[
local <?fs?> = require 'bee.filesystem'
]]