summaryrefslogtreecommitdiff
path: root/meta/template
diff options
context:
space:
mode:
authorC3pa <41503714+C3pa@users.noreply.github.com>2023-07-26 11:16:04 +0200
committerC3pa <41503714+C3pa@users.noreply.github.com>2023-07-26 11:16:04 +0200
commit8f09bd43cbf8f650ab857f0c5710f9d1ddc93de3 (patch)
tree3623740ddf5940fe3bf3e8696627fb86d37ba497 /meta/template
parent666a23e85707b73c22e02f620ad40607b18c4676 (diff)
downloadlua-language-server-8f09bd43cbf8f650ab857f0c5710f9d1ddc93de3.zip
Update string.dump so it doesn't have strip argument in Lua 5.1 and 5.2
Diffstat (limited to 'meta/template')
-rw-r--r--meta/template/string.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/template/string.lua b/meta/template/string.lua
index b0acb5b8..c5fe6ab6 100644
--- a/meta/template/string.lua
+++ b/meta/template/string.lua
@@ -20,11 +20,18 @@ function string.byte(s, i, j) end
function string.char(byte, ...) end
---#DES 'string.dump'
+---#if VERSION >= 5.3 or JIT then
---@param f async fun(...):...
---@param strip? boolean
---@return string
---@nodiscard
function string.dump(f, strip) end
+---#else
+---@param f async fun(...):...
+---@return string
+---@nodiscard
+function string.dump(f) end
+---#end
---#DES 'string.find'
---@param s string|number
@@ -93,6 +100,7 @@ function string.match(s, pattern, init) end
---#DES 'string.pack'
---@param fmt string
---@param v1 string|number
+---@param v2 string|number
---@param ... string|number
---@return string binary
---@nodiscard