diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-12-11 19:01:53 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-12-11 19:01:53 +0800 |
commit | ec20a72e9dc6eab4a7aaa2f407e1496d40e4c6eb (patch) | |
tree | e844f838a38aee272b8484840b16bb228f5ac325 /script/parser/guide.lua | |
parent | 87673cfad9e4fc32a2023c24a3d7d2248e8d2916 (diff) | |
download | lua-language-server-ec20a72e9dc6eab4a7aaa2f407e1496d40e4c6eb.zip |
stash
Diffstat (limited to 'script/parser/guide.lua')
-rw-r--r-- | script/parser/guide.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua index 022be26d..d5e6d29d 100644 --- a/script/parser/guide.lua +++ b/script/parser/guide.lua @@ -2941,17 +2941,17 @@ local function getDocAliasExtends(status, typeUnit) return nil end -local function getDocTypeUnitName(status, unit) +function m.getDocTypeUnitName(status, unit) local typeName if unit.type == 'doc.type.name' then typeName = unit[1] elseif unit.type == 'doc.type.function' then typeName = 'function' elseif unit.type == 'doc.type.array' then - typeName = getDocTypeUnitName(status, unit.node) .. '[]' + typeName = m.getDocTypeUnitName(status, unit.node) .. '[]' elseif unit.type == 'doc.type.generic' then typeName = ('%s<%s, %s>'):format( - getDocTypeUnitName(status, unit.node), + m.getDocTypeUnitName(status, unit.node), m.viewInferType(m.getDocTypeNames(status, unit.key)), m.viewInferType(m.getDocTypeNames(status, unit.value)) ) @@ -2975,7 +2975,7 @@ function m.getDocTypeNames(status, doc) results[#results+1] = res end else - local typeName = getDocTypeUnitName(status, unit) + local typeName = m.getDocTypeUnitName(status, unit) results[#results+1] = { type = typeName, source = unit, |