diff options
-rw-r--r-- | changelog.md | 1 | ||||
-rw-r--r-- | script/parser/luadoc.lua | 2 | ||||
-rw-r--r-- | test/type_inference/init.lua | 4 |
3 files changed, 6 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md index 17a82ec0..6ecdef04 100644 --- a/changelog.md +++ b/changelog.md @@ -46,6 +46,7 @@ * `FIX` [#1311](https://github.com/sumneko/lua-language-server/issues/1311) * `FIX` [#1317](https://github.com/sumneko/lua-language-server/issues/1317) * `FIX` [#1320](https://github.com/sumneko/lua-language-server/issues/1320) +* `FIX` [#1330](https://github.com/sumneko/lua-language-server/issues/1330) ## 3.4.2 `2022-7-6` diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua index e8a6d2b3..37a1843d 100644 --- a/script/parser/luadoc.lua +++ b/script/parser/luadoc.lua @@ -19,7 +19,7 @@ X16 <- [a-fA-F0-9] Token <- Integer / Name / String / Code / Symbol Name <- ({} {%name} {}) -> Name -Integer <- ({} {[0-9]+} !'.' {}) +Integer <- ({} {'-'? [0-9]+} !'.' {}) -> Integer Code <- ({} '`' { (!'`' .)*} '`' {}) -> Code diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 30f47900..c40ef054 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -3715,3 +3715,7 @@ A.B.C = 1 print(A.B.<?C?>) ]] +TEST '-2|-3|1' [[ +---@type 1|-2|-3 +local <?n?> +]] |