Skip to content

Commit 7503881

Browse files
authored
fix LSP crashes when parsing tuples
1 parent 7f95e6f commit 7503881

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

script/parser/luadoc.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,9 @@ local function parseTuple(parent)
417417
}
418418
index = index + 1
419419
field.extends = parseType(field)
420+
if not field.extends then
421+
break
422+
end
420423
field.optional = field.extends.optional
421424
field.start = field.extends.start
422425
field.finish = field.extends.finish

0 commit comments

Comments
 (0)