diff options
-rw-r--r-- | script/core/noder.lua | 2 | ||||
-rw-r--r-- | script/parser/luadoc.lua | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/script/core/noder.lua b/script/core/noder.lua index 749dcba6..3aad105e 100644 --- a/script/core/noder.lua +++ b/script/core/noder.lua @@ -1245,6 +1245,7 @@ compileNodeMap = util.switch() if not param1 then param1 = { type = 'select', + dummy = true, sindex = 2, start = node.start, finish = node.finish, @@ -1254,6 +1255,7 @@ compileNodeMap = util.switch() if not param2 then param2 = { type = 'select', + dummy = true, sindex = 2, start = node.start, finish = node.finish, diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua index 314e8e51..040bf4bb 100644 --- a/script/parser/luadoc.lua +++ b/script/parser/luadoc.lua @@ -552,7 +552,6 @@ function parseType(parent) enums = {}, resumes = {}, } - result.start = getStart() while true do local tp, content = peekToken() if not tp then @@ -630,6 +629,9 @@ function parseType(parent) end nextToken() end + if not result.start then + result.start = getFinish() + 1 + end result.finish = getFinish() + 1 result.firstFinish = result.finish @@ -697,7 +699,7 @@ function parseType(parent) if #result.types == 0 and #result.enums == 0 and #result.resumes == 0 then pushError { type = 'LUADOC_MISS_TYPE_NAME', - start = getFinish(), + start = getFinish() + 1, finish = getFinish() + 1, } return nil |