Codebase list lua-ldoc / 10fbe13
support lua5.4 https://github.com/lunarmodules/LDoc/commit/7cf78143a53f7e6a828e5f2a148796e0bbd2676a.patch Victor Seva 2 years ago
3 changed file(s) with 55 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
66 1 file changed, 2 insertions(+), 1 deletion(-)
77
88 diff --git a/ldoc.lua b/ldoc.lua
9 index e32472c..ccdb65e 100644
9 index 4cb9966..00e5cce 100644
1010 --- a/ldoc.lua
1111 +++ b/ldoc.lua
1212 @@ -1,4 +1,5 @@
0 From: Digifox03 <digifox03@protonmail.com>
1 Date: Tue, 9 Nov 2021 13:05:05 +0100
2 Subject: Add support for lua 5.4 manual
3
4 ---
5 ldoc/builtin/globals.lua | 20 ++++++++++++++++++--
6 1 file changed, 18 insertions(+), 2 deletions(-)
7
8 diff --git a/ldoc/builtin/globals.lua b/ldoc/builtin/globals.lua
9 index a26f605..e869032 100644
10 --- a/ldoc/builtin/globals.lua
11 +++ b/ldoc/builtin/globals.lua
12 @@ -4,6 +4,7 @@ local tools = require 'ldoc.tools'
13 local globals = {}
14 local lua52 = _VERSION:match '5.2'
15 local lua53 = _VERSION:match '5.3'
16 +local lua54 = _VERSION:match '5.4'
17
18
19 globals.functions = {
20 @@ -34,7 +35,10 @@ globals.functions = {
21 }
22 local functions = globals.functions
23
24 -if lua52 or lua53 then
25 +if lua54 then
26 + functions.warn = true
27 + functions.rawlen = true
28 +elseif lua52 or lua53 then
29 functions.rawlen = true
30 else
31 functions.setfenv = true
32 @@ -49,7 +53,19 @@ function globals.set_manual_url(url)
33 fun_ref = manual..'pdf-'
34 end
35
36 -if lua53 then
37 +if lua54 then
38 + globals.tables = {
39 + io = '6.8',
40 + package = '6.3',
41 + math = '6.7',
42 + os = '6.9',
43 + string = '6.4',
44 + table = '6.6',
45 + coroutine = '6.2',
46 + debug = '6.10'
47 + }
48 + globals.set_manual_url 'https://www.lua.org/manual/5.4/manual.html'
49 +elseif lua53 then
50 globals.tables = {
51 io = '6.8',
52 package = '6.3',
00 0001-Use-lua-any-to-choose-the-right-interpreter-version.patch
1 0002-Add-support-for-lua-5.4-manual.patch