mirror of
https://github.com/Reuh/candran.git
synced 2025-10-27 09:59:29 +00:00
Added 0.5.0 tests
Also removed an error thrown when the start of an implicit push looks like an assignment...
This commit is contained in:
parent
d249c353c5
commit
724249555f
4 changed files with 98 additions and 5 deletions
|
|
@ -541,7 +541,7 @@ else
|
|||
push("push", false)
|
||||
end
|
||||
r = r .. (lua(t[2]))
|
||||
if hasPush then
|
||||
if hasPush and (t[2][# t[2]] and t[2][# t[2]]["tag"] ~= "Return") then
|
||||
r = r .. (newline() .. "return " .. UNPACK(var("push")))
|
||||
end
|
||||
pop("push")
|
||||
|
|
@ -1100,7 +1100,7 @@ else
|
|||
push("push", false)
|
||||
end
|
||||
r = r .. (lua(t[2]))
|
||||
if hasPush then
|
||||
if hasPush and (t[2][# t[2]] and t[2][# t[2]]["tag"] ~= "Return") then
|
||||
r = r .. (newline() .. "return " .. UNPACK(var("push")))
|
||||
end
|
||||
pop("push")
|
||||
|
|
@ -2667,7 +2667,7 @@ V("Lua"),
|
|||
["PushStat"] = tagC("Push", kw("push") * commaSep(V("Expr"), "RetList") ^ - 1 * sym(";") ^ - 1),
|
||||
["ImplicitPushStat"] = tagC("Push", commaSep(V("Expr"), "RetList") * sym(";") ^ - 1),
|
||||
["NameList"] = tagC("NameList", commaSep(V("Id"))),
|
||||
["VarList"] = tagC("VarList", commaSep(V("VarExpr"), "VarList")),
|
||||
["VarList"] = tagC("VarList", commaSep(V("VarExpr"))),
|
||||
["ExprList"] = tagC("ExpList", commaSep(V("Expr"), "ExprList")),
|
||||
["Expr"] = V("OrExpr"),
|
||||
["OrExpr"] = chainOp(V("AndExpr"), V("OrOp"), "OrExpr"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue