diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-03-01 14:26:00 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-03-01 14:26:00 +0800 |
commit | ead187327a6d8d42612856f6e9de153a1994a836 (patch) | |
tree | 8f8524af5a5c5b322d3f983106c9d6283b6b9862 /script/parser/guide.lua | |
parent | 6d09c0b9e716e3fcf77eea6d0a3566fbb2fef3bb (diff) | |
download | lua-language-server-ead187327a6d8d42612856f6e9de153a1994a836.zip |
always sort
Diffstat (limited to 'script/parser/guide.lua')
-rw-r--r-- | script/parser/guide.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua index b2b1e583..cbafe66a 100644 --- a/script/parser/guide.lua +++ b/script/parser/guide.lua @@ -130,6 +130,8 @@ local TypeSort = { ['number'] = 4, ['table'] = 5, ['function'] = 6, + ['true'] = 101, + ['false'] = 102, ['nil'] = 999, } @@ -3195,7 +3197,11 @@ function m.mergeTypes(types) tableSort(results, function (a, b) local sa = TypeSort[a] or 100 local sb = TypeSort[b] or 100 - return sa < sb + if sa == sb then + return a < b + else + return sa < sb + end end) return tableConcat(results, '|') end |