summaryrefslogtreecommitdiff
path: root/script/encoder/init.lua
diff options
context:
space:
mode:
authorAlexCai2019 <89138532+AlexCai2019@users.noreply.github.com>2022-05-08 01:43:28 +0800
committerGitHub <noreply@github.com>2022-05-08 01:43:28 +0800
commit0fd83c4ca9f82a02becab6c304a8a7de75098507 (patch)
treebe9790d9d4823fe728c5b36e94093fe5f42b7725 /script/encoder/init.lua
parent89203efad8c9b5513e05ca4d5696107924865b10 (diff)
parent67b4c574849d1667e0ecb39c51aeed8e30b43056 (diff)
downloadlua-language-server-0fd83c4ca9f82a02becab6c304a8a7de75098507.zip
Merge branch 'sumneko:master' into master
Diffstat (limited to 'script/encoder/init.lua')
-rw-r--r--script/encoder/init.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/script/encoder/init.lua b/script/encoder/init.lua
index 0011265a..3c8a58e0 100644
--- a/script/encoder/init.lua
+++ b/script/encoder/init.lua
@@ -10,9 +10,9 @@ local utf16be = utf16('be', utf8.codepoint '�')
local m = {}
---@param encoding encoder.encoding
----@param s string
----@param i integer
----@param j integer
+---@param s string
+---@param i? integer
+---@param j? integer
function m.len(encoding, s, i, j)
i = i or 1
j = j or #s
@@ -33,9 +33,9 @@ function m.len(encoding, s, i, j)
end
---@param encoding encoder.encoding
----@param s string
----@param n integer
----@param i integer
+---@param s string
+---@param n integer
+---@param i? integer
function m.offset(encoding, s, n, i)
i = i or 1
if encoding == 'utf16'