diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-01-25 10:20:01 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-01-25 10:20:01 +0800 |
commit | 7d6885350af462d400c39a557703890d4ec507f1 (patch) | |
tree | 2569790239c1c7c2488af7751a03f35a449f12e0 /script | |
parent | 83031aa44d6a3ca09f14ecc84927e3773fda86fa (diff) | |
download | lua-language-server-7d6885350af462d400c39a557703890d4ec507f1.zip |
fix #359
Diffstat (limited to 'script')
-rw-r--r-- | script/parser/ast.lua | 4 |
1 files changed, 3 insertions, 1 deletions
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, |