summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rw-r--r--script/core/rename.lua22
-rw-r--r--script/parser/guide.lua3
2 files changed, 15 insertions, 10 deletions
diff --git a/script/core/rename.lua b/script/core/rename.lua
index 98895826..507def20 100644
--- a/script/core/rename.lua
+++ b/script/core/rename.lua
@@ -239,7 +239,8 @@ local function ofDocTypeName(source, newname, callback)
end
local refs = vm.getRefs(source)
for _, doc in ipairs(refs) do
- if doc.type == 'doc.type.name' then
+ if doc.type == 'doc.type.name'
+ or doc.type == 'doc.extends.name' then
callback(doc, doc.start, doc.finish, newname)
end
end
@@ -283,7 +284,8 @@ local function rename(source, newname, callback)
elseif source.type == 'doc.class.name'
or source.type == 'doc.type.name'
or source.type == 'doc.alias.name'
- or source.type == 'doc.enum.name' then
+ or source.type == 'doc.enum.name'
+ or source.type == 'doc.extends.name' then
return ofDocTypeName(source, newname, callback)
elseif source.type == 'doc.param.name' then
return ofDocParamName(source, newname, callback)
@@ -321,7 +323,8 @@ local function prepareRename(source)
or source.type == 'doc.alias.name'
or source.type == 'doc.enum.name'
or source.type == 'doc.param.name'
- or source.type == 'doc.field.name' then
+ or source.type == 'doc.field.name'
+ or source.type == 'doc.extends.name' then
return source, source[1]
elseif source.type == 'string'
or source.type == 'number'
@@ -357,12 +360,13 @@ local accept = {
['number'] = true,
['integer'] = true,
- ['doc.class.name'] = true,
- ['doc.type.name'] = true,
- ['doc.alias.name'] = true,
- ['doc.param.name'] = true,
- ['doc.enum.name'] = true,
- ['doc.field.name'] = true,
+ ['doc.class.name'] = true,
+ ['doc.type.name'] = true,
+ ['doc.alias.name'] = true,
+ ['doc.param.name'] = true,
+ ['doc.enum.name'] = true,
+ ['doc.field.name'] = true,
+ ['doc.extends.name'] = true,
}
local m = {}
diff --git a/script/parser/guide.lua b/script/parser/guide.lua
index 96142be5..24709104 100644
--- a/script/parser/guide.lua
+++ b/script/parser/guide.lua
@@ -1013,7 +1013,8 @@ function m.getKeyName(obj)
or tp == 'doc.type.name'
or tp == 'doc.class.name'
or tp == 'doc.alias.name'
- or tp == 'doc.enum.name' then
+ or tp == 'doc.enum.name'
+ or tp == 'doc.extends.name' then
return obj[1]
elseif tp == 'doc.type.field' then
return m.getKeyName(obj.name)