summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changelog.md1
-rw-r--r--script/parser/ast.lua4
2 files changed, 4 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md
index 674e948e..4276d5e5 100644
--- a/changelog.md
+++ b/changelog.md
@@ -3,6 +3,7 @@
## 1.12.0
* `NEW` [#340](https://github.com/sumneko/lua-language-server/pull/340): supports `---@type table<string, number>`
* `FIX` [#355](https://github.com/sumneko/lua-language-server/pull/355)
+* `FIX` [#359](https://github.com/sumneko/lua-language-server/issues/359)
## 1.11.2
`2021-1-7`
diff --git a/script/parser/ast.lua b/script/parser/ast.lua
index 8ddf0ff4..605555df 100644
--- a/script/parser/ast.lua
+++ b/script/parser/ast.lua
@@ -547,6 +547,7 @@ local Defs = {
finish = finish - 1,
[1] = n,
}
+ State.LastRaw = number
return State.LastNumber
else
PushError {
@@ -560,12 +561,13 @@ local Defs = {
finish = finish - 1,
[1] = 0,
}
+ State.LastRaw = number
return State.LastNumber
end
end,
FFINumber = function (start, symbol)
local lastNumber = State.LastNumber
- if mathType(lastNumber[1]) == 'float' then
+ if State.LastRaw:find('.', 1, true) then
PushError {
type = 'UNKNOWN_SYMBOL',
start = start,