From 50c78c90cdfc188ab473bd12e17752d2101d5f05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 13 Nov 2020 16:27:10 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=80=E4=BA=9B=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/diagnostics/doc-field-no-class.lua | 23 +++++++++++----------- 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'script-beta/core/diagnostics/doc-field-no-class.lua') 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 -- cgit v1.2.3