summaryrefslogtreecommitdiff
path: root/script/parser/luadoc.lua
diff options
context:
space:
mode:
authorlizho <lizho@msn.com>2024-01-30 15:45:10 +0800
committerGitHub <noreply@github.com>2024-01-30 15:45:10 +0800
commit7503881344501248ac36d25d85dfc560809ced21 (patch)
treef6d0e84849d08f81148588a00d4c384e5d3f36d5 /script/parser/luadoc.lua
parent7f95e6f71862967bcdc9ca1d78a1947dd177ca3e (diff)
downloadlua-language-server-7503881344501248ac36d25d85dfc560809ced21.zip
fix LSP crashes when parsing tuples
Diffstat (limited to 'script/parser/luadoc.lua')
-rw-r--r--script/parser/luadoc.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua
index 1a777be1..6d9bad0d 100644
--- a/script/parser/luadoc.lua
+++ b/script/parser/luadoc.lua
@@ -417,6 +417,9 @@ local function parseTuple(parent)
}
index = index + 1
field.extends = parseType(field)
+ if not field.extends then
+ break
+ end
field.optional = field.extends.optional
field.start = field.extends.start
field.finish = field.extends.finish