summaryrefslogtreecommitdiff
path: root/server-beta/src/files.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server-beta/src/files.lua')
-rw-r--r--server-beta/src/files.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/server-beta/src/files.lua b/server-beta/src/files.lua
index 076c491b..34c8c2de 100644
--- a/server-beta/src/files.lua
+++ b/server-beta/src/files.lua
@@ -195,6 +195,28 @@ function m.getOriginUri(uri)
return file.uri
end
+function m.setDiagnostic(uri, diag)
+ if platform.OS == 'Windows' then
+ uri = uri:lower()
+ end
+ local file = m.fileMap[uri]
+ if not file then
+ return
+ end
+ file._diag = diag
+end
+
+function m.getDiagnostic(uri)
+ if platform.OS == 'Windows' then
+ uri = uri:lower()
+ end
+ local file = m.fileMap[uri]
+ if not file then
+ return nil
+ end
+ return file._diag
+end
+
--- 寻找全局变量
function m.findGlobals(name)
local uris = {}