diff options
author | AlexCai2019 <89138532+AlexCai2019@users.noreply.github.com> | 2022-05-08 01:43:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-08 01:43:28 +0800 |
commit | 0fd83c4ca9f82a02becab6c304a8a7de75098507 (patch) | |
tree | be9790d9d4823fe728c5b36e94093fe5f42b7725 /script/utility.lua | |
parent | 89203efad8c9b5513e05ca4d5696107924865b10 (diff) | |
parent | 67b4c574849d1667e0ecb39c51aeed8e30b43056 (diff) | |
download | lua-language-server-0fd83c4ca9f82a02becab6c304a8a7de75098507.zip |
Merge branch 'sumneko:master' into master
Diffstat (limited to 'script/utility.lua')
-rw-r--r-- | script/utility.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/script/utility.lua b/script/utility.lua index 5a52e417..47b0c8d8 100644 --- a/script/utility.lua +++ b/script/utility.lua @@ -83,7 +83,7 @@ local m = {} --- 打印表的结构 ---@param tbl table ----@param option table {optional = 'self'} +---@param option? table ---@return string function m.dump(tbl, option) if not option then @@ -315,8 +315,8 @@ function m.saveFile(path, content) end --- 计数器 ----@param init integer {optional = 'after'} ----@param step integer {optional = 'after'} +---@param init? integer +---@param step? integer ---@return fun():integer function m.counter(init, step) if not step then @@ -346,8 +346,8 @@ function m.sortPairs(t, sorter) end --- 深拷贝(不处理元表) ----@param source table ----@param target table {optional = 'self'} +---@param source table +---@param target? table function m.deepCopy(source, target) local mark = {} local function copy(a, b) @@ -566,7 +566,7 @@ end ---遍历文本的每一行 ---@param text string ----@param keepNL boolean # 保留换行符 +---@param keepNL? boolean # 保留换行符 ---@return fun(text:string):string, integer function m.eachLine(text, keepNL) local offset = 1 |