summaryrefslogtreecommitdiff
path: root/script-beta/core/diagnostics/doc-field-no-class.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-11-13 16:27:10 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-11-13 16:27:10 +0800
commit50c78c90cdfc188ab473bd12e17752d2101d5f05 (patch)
treec896112142e9ee44af55330b21d401e53f263c2a /script-beta/core/diagnostics/doc-field-no-class.lua
parentc3e280a5bc556cb8ff87a6b0fc6f7a7c48292d4d (diff)
downloadlua-language-server-50c78c90cdfc188ab473bd12e17752d2101d5f05.zip
修正一些问题
Diffstat (limited to 'script-beta/core/diagnostics/doc-field-no-class.lua')
-rw-r--r--script-beta/core/diagnostics/doc-field-no-class.lua23
1 files changed, 11 insertions, 12 deletions
diff --git a/script-beta/core/diagnostics/doc-field-no-class.lua b/script-beta/core/diagnostics/doc-field-no-class.lua
index 88c61824..f27bbb32 100644
--- a/script-beta/core/diagnostics/doc-field-no-class.lua
+++ b/script-beta/core/diagnostics/doc-field-no-class.lua
@@ -23,19 +23,18 @@ return function (uri, callback)
for _, other in ipairs(bindGroup) do
if other.type == 'doc.class' then
ok = true
- elseif other == doc then
- if not ok then
- callback {
- start = doc.start,
- finish = doc.finish,
- message = lang.script('DIAG_DOC_FIELD_NO_CLASS'),
- }
- end
- goto CONTINUE
- elseif other.type == 'doc.field' then
- else
- ok = false
+ break
end
+ if other == doc then
+ break
+ end
+ end
+ if not ok then
+ callback {
+ start = doc.start,
+ finish = doc.finish,
+ message = lang.script('DIAG_DOC_FIELD_NO_CLASS'),
+ }
end
::CONTINUE::
end