mirror of
https://github.com/CorsixTH/CorsixTH.git
synced 2025-07-23 04:13:01 +02:00
Remove lpeg version check in docs build (#2414)
This commit is contained in:
@@ -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
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
SOFTWARE. --]]
|
SOFTWARE. --]]
|
||||||
|
|
||||||
local lpeg = require "lpeg"
|
local lpeg = require("lpeg")
|
||||||
need_lpeg_version(0, 9)
|
|
||||||
|
|
||||||
local C, P, R, S, V = lpeg.C, lpeg.P, lpeg.R, lpeg.S, lpeg.V
|
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
|
local Carg, Cc, Cp, Ct = lpeg.Carg, lpeg.Cc, lpeg.Cp, lpeg.Ct
|
||||||
|
@@ -25,16 +25,6 @@ if not rawget(_G, "loadstring") then
|
|||||||
loadstring = load
|
loadstring = load
|
||||||
end
|
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
|
||||||
local auto_tokens_c = {
|
local auto_tokens_c = {
|
||||||
[","] = {"operator", ","},
|
[","] = {"operator", ","},
|
||||||
|
@@ -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
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
SOFTWARE. --]]
|
SOFTWARE. --]]
|
||||||
|
|
||||||
local L = require "lpeg"
|
local L = require("lpeg")
|
||||||
need_lpeg_version(0, 9)
|
|
||||||
|
|
||||||
local C, P, R, S, V = L.C, L.P, L.R, L.S, L.V
|
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
|
local Carg, Cc, Cp, Ct, Cg, Cb, Cmt = L.Carg, L.Cc, L.Cp, L.Ct, L.Cg, L.Cb, L.Cmt
|
||||||
|
Reference in New Issue
Block a user