diff options
Diffstat (limited to 'script-beta')
-rw-r--r-- | script-beta/core/diagnostics/doc-field-no-class.lua | 23 | ||||
-rw-r--r-- | script-beta/library.lua | 2 | ||||
-rw-r--r-- | script-beta/parser/guide.lua | 4 |
3 files changed, 14 insertions, 15 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 diff --git a/script-beta/library.lua b/script-beta/library.lua index 78321d6a..a4741fd1 100644 --- a/script-beta/library.lua +++ b/script-beta/library.lua @@ -315,7 +315,7 @@ local function compileMetaDoc() language = langID, }) if fs.exists(m.metapath) then - return + --return end fs.create_directory(m.metapath) local templateDir = ROOT / 'meta' / 'template' diff --git a/script-beta/parser/guide.lua b/script-beta/parser/guide.lua index 288a0381..b85d10d8 100644 --- a/script-beta/parser/guide.lua +++ b/script-beta/parser/guide.lua @@ -806,8 +806,8 @@ end ---@param a table ---@param b table ---@return string|boolean mode ----@return table|nil pathA ----@return table|nil pathB +---@return table pathA? +---@return table pathB? function m.getPath(a, b, sameFunction) --- 首先测试双方在同一个函数内 if sameFunction and m.getParentFunction(a) ~= m.getParentFunction(b) then |