Remove lpeg version check in docs build (#2414)

This commit is contained in:
Toby
2023-09-30 17:31:21 +01:00
committed by GitHub
parent 87858c2d5a
commit 0202eb30d9
3 changed files with 2 additions and 14 deletions

View File

@@ -18,8 +18,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. --]]
local lpeg = require "lpeg"
need_lpeg_version(0, 9)
local lpeg = require("lpeg")
local C, P, R, S, V = lpeg.C, lpeg.P, lpeg.R, lpeg.S, lpeg.V
local Carg, Cc, Cp, Ct = lpeg.Carg, lpeg.Cc, lpeg.Cp, lpeg.Ct

View File

@@ -25,16 +25,6 @@ if not rawget(_G, "loadstring") then
loadstring = load
end
function need_lpeg_version(major, minor)
local v = require"lpeg".version()
local m, n = v:match"^(%d+)%.(%d+)"
m = tonumber(m)
n = tonumber(n)
if m < major or (m == major and n < minor) then
error(("LPEG version >= %d.%d is required (you have %s)"):format(major, minor, v))
end
end
local auto_tokens
local auto_tokens_c = {
[","] = {"operator", ","},

View File

@@ -18,8 +18,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. --]]
local L = require "lpeg"
need_lpeg_version(0, 9)
local L = require("lpeg")
local C, P, R, S, V = L.C, L.P, L.R, L.S, L.V
local Carg, Cc, Cp, Ct, Cg, Cb, Cmt = L.Carg, L.Cc, L.Cp, L.Ct, L.Cg, L.Cb, L.Cmt