diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-07-06 23:34:54 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-07-06 23:34:54 +0800 |
commit | 79cc877095745be377b9dd189ee5e38cf35a3c5e (patch) | |
tree | 9e5f0e07741c8c5022d08672fef2ba137e352703 /script/utility.lua | |
parent | 27dcfa8d1463936d0b2514cd82eebe1910ab3bb7 (diff) | |
download | lua-language-server-79cc877095745be377b9dd189ee5e38cf35a3c5e.zip |
semantic and completion description
Diffstat (limited to 'script/utility.lua')
-rw-r--r-- | script/utility.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/script/utility.lua b/script/utility.lua index e7aabaca..8e6c6a88 100644 --- a/script/utility.lua +++ b/script/utility.lua @@ -524,6 +524,14 @@ function m.revertTable(t) return t end +function m.revertMap(t) + local nt = {} + for k, v in pairs(t) do + nt[v] = k + end + return nt +end + function m.randomSortTable(t, max) local len = #t if len <= 1 then |