File tree Expand file tree Collapse file tree 3 files changed +18
-13
lines changed Expand file tree Collapse file tree 3 files changed +18
-13
lines changed Original file line number Diff line number Diff line change 44* ` FIX ` commandline parameter ` checklevel ` may not work
55* ` FIX ` [ #2036 ]
66* ` FIX ` [ #2037 ]
7+ * ` FIX ` [ #2056 ]
78* ` FIX ` [ #2077 ]
89* ` FIX ` [ #2081 ]
910
1011[ #2036 ] : https://github.com/LuaLS/lua-language-server/issues/2036
1112[ #2037 ] : https://github.com/LuaLS/lua-language-server/issues/2037
13+ [ #2056 ] : https://github.com/LuaLS/lua-language-server/issues/2056
1214[ #2077 ] : https://github.com/LuaLS/lua-language-server/issues/2077
1315[ #2081 ] : https://github.com/LuaLS/lua-language-server/issues/2081
1416
Original file line number Diff line number Diff line change @@ -700,6 +700,8 @@ local function parseResume(parent)
700700 return result
701701end
702702
703+ local lockResume = false
704+
703705function parseType (parent )
704706 local result = {
705707 type = ' doc.type' ,
@@ -778,20 +780,10 @@ function parseType(parent)
778780 return false
779781 end
780782
781- local checkResume = true
782- local nsymbol , ncontent = peekToken ()
783- if nsymbol == ' symbol' then
784- if ncontent == ' ,'
785- or ncontent == ' :'
786- or ncontent == ' |'
787- or ncontent == ' )'
788- or ncontent == ' }' then
789- checkResume = false
790- end
791- end
792-
793- if checkResume then
783+ if not lockResume then
784+ lockResume = true
794785 while pushResume () do end
786+ lockResume = false
795787 end
796788
797789 if # result .types == 0 then
@@ -2051,6 +2043,7 @@ return function (state)
20512043 if not comment then
20522044 break
20532045 end
2046+ lockResume = false
20542047 local doc , rests = buildLuaDoc (comment )
20552048 if doc then
20562049 insertDoc (doc , comment )
Original file line number Diff line number Diff line change @@ -4268,3 +4268,13 @@ local b = '2';
42684268
42694269local <?c?> = a .. b;
42704270]]
4271+
4272+ TEST ' number|{ [1]: string }' [[
4273+ ---@alias Some
4274+ ---| { [1]: string }
4275+ ---| number
4276+
4277+ local x ---@type Some
4278+
4279+ print(<?x?>)
4280+ ]]
You can’t perform that action at this time.
0 commit comments