File tree 3 files changed +18
-13
lines changed
3 files changed +18
-13
lines changed Original file line number Diff line number Diff line change 4
4
* ` FIX ` commandline parameter ` checklevel ` may not work
5
5
* ` FIX ` [ #2036 ]
6
6
* ` FIX ` [ #2037 ]
7
+ * ` FIX ` [ #2056 ]
7
8
* ` FIX ` [ #2077 ]
8
9
* ` FIX ` [ #2081 ]
9
10
10
11
[ #2036 ] : https://github.com/LuaLS/lua-language-server/issues/2036
11
12
[ #2037 ] : https://github.com/LuaLS/lua-language-server/issues/2037
13
+ [ #2056 ] : https://github.com/LuaLS/lua-language-server/issues/2056
12
14
[ #2077 ] : https://github.com/LuaLS/lua-language-server/issues/2077
13
15
[ #2081 ] : https://github.com/LuaLS/lua-language-server/issues/2081
14
16
Original file line number Diff line number Diff line change @@ -700,6 +700,8 @@ local function parseResume(parent)
700
700
return result
701
701
end
702
702
703
+ local lockResume = false
704
+
703
705
function parseType (parent )
704
706
local result = {
705
707
type = ' doc.type' ,
@@ -778,20 +780,10 @@ function parseType(parent)
778
780
return false
779
781
end
780
782
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
794
785
while pushResume () do end
786
+ lockResume = false
795
787
end
796
788
797
789
if # result .types == 0 then
@@ -2051,6 +2043,7 @@ return function (state)
2051
2043
if not comment then
2052
2044
break
2053
2045
end
2046
+ lockResume = false
2054
2047
local doc , rests = buildLuaDoc (comment )
2055
2048
if doc then
2056
2049
insertDoc (doc , comment )
Original file line number Diff line number Diff line change @@ -4268,3 +4268,13 @@ local b = '2';
4268
4268
4269
4269
local <?c?> = a .. b;
4270
4270
]]
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