summaryrefslogtreecommitdiff
path: root/script/parser
diff options
context:
space:
mode:
Diffstat (limited to 'script/parser')
-rw-r--r--script/parser/guide.lua8
-rw-r--r--script/parser/luadoc.lua3
2 files changed, 6 insertions, 5 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua
index 1bda2d32..73857149 100644
--- a/script/parser/guide.lua
+++ b/script/parser/guide.lua
@@ -928,7 +928,7 @@ function m.getKeyName(obj)
or tp == 'tableindex' then
return m.getKeyNameOfLiteral(obj.index)
elseif tp == 'tableexp' then
- return tostring(obj.tindex)
+ return obj.tindex
elseif tp == 'field'
or tp == 'method'
or tp == 'doc.see.field' then
@@ -938,11 +938,11 @@ function m.getKeyName(obj)
elseif tp == 'doc.alias' then
return obj.alias[1]
elseif tp == 'doc.field' then
- return tostring(obj.field[1])
+ return obj.field[1]
elseif tp == 'doc.field.name' then
- return tostring(obj[1])
+ return obj[1]
elseif tp == 'doc.type.field' then
- return tostring(obj.name[1])
+ return obj.name[1]
elseif tp == 'dummy' then
return obj[1]
end
diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua
index 5b9bdfad..9b041870 100644
--- a/script/parser/luadoc.lua
+++ b/script/parser/luadoc.lua
@@ -224,6 +224,7 @@ local function parseIndexField(tp, parent)
return nil
end
nextToken()
+ local start = getFinish() - 1
local indexTP, index = peekToken()
if indexTP == 'name' then
local field = parseType(parent)
@@ -233,7 +234,7 @@ local function parseIndexField(tp, parent)
nextToken()
local class = {
type = tp,
- start = getStart(),
+ start = start,
finish = getFinish(),
parent = parent,
}