diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-11-13 16:27:10 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-11-13 16:27:10 +0800 |
commit | 50c78c90cdfc188ab473bd12e17752d2101d5f05 (patch) | |
tree | c896112142e9ee44af55330b21d401e53f263c2a /script-beta/core/diagnostics/doc-field-no-class.lua | |
parent | c3e280a5bc556cb8ff87a6b0fc6f7a7c48292d4d (diff) | |
download | lua-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.lua | 23 |
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 |