summaryrefslogtreecommitdiff
path: root/script/encoder
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-23 00:42:10 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-23 00:42:10 +0800
commitec1f746a71dfb981f093bf00322db75d559fd6b6 (patch)
tree71730d2de455bf7cd8a9481a554a56cddf47f341 /script/encoder
parent6e00db5b51646ad91c5ee5598897cad7f8d65915 (diff)
downloadlua-language-server-ec1f746a71dfb981f093bf00322db75d559fd6b6.zip
fix optional parameters
Diffstat (limited to 'script/encoder')
-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'