From ce152c9d10b57b8a7d33ea7ec695c037b0028f40 Mon Sep 17 00:00:00 2001 From: Sergio Queiroz Date: Fri, 23 Jun 2017 13:43:39 -0300 Subject: Fixing bug when getting the length of a table --- relabel.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/relabel.lua b/relabel.lua index cf76e89..b02c95d 100644 --- a/relabel.lua +++ b/relabel.lua @@ -222,7 +222,7 @@ local function choicerec (...) local p = t[1] local i = 2 while i + 1 <= n do - -- t[i] == nil when there are no labels + -- t[i] == false when there are no labels p = t[i] and mm.Rec(p, t[i+1], unpack(t[i])) or mt.__add(p, t[i+1]) i = i + 2 end @@ -232,7 +232,7 @@ end local exp = m.P{ "Exp", Exp = S * ( m.V"Grammar" - + (m.V"Seq" * (S * (("//" * m.Ct(m.V"Labels")) + ("/" * m.Cc(nil))) + + (m.V"Seq" * (S * (("//" * m.Ct(m.V"Labels")) + ("/" * m.Cc(false))) * expect(S * m.V"Seq", "ExpPatt1") )^0 ) / choicerec); -- cgit v1.2.3-55-g6feb