Allow while-block in at-animate macro

This commit is contained in:
Mosè Giordano 2021-05-13 10:14:03 +01:00
parent d544647b1b
commit 788e28d18a

View File

@ -137,8 +137,8 @@ end
# ----------------------------------------------- # -----------------------------------------------
function _animate(forloop::Expr, args...; callgif = false) function _animate(forloop::Expr, args...; callgif = false)
if forloop.head != :for if forloop.head (:for, :while)
error("@animate macro expects a for-block. got: $(forloop.head)") error("@animate macro expects a for- or while-block. got: $(forloop.head)")
end end
# add the call to frame to the end of each iteration # add the call to frame to the end of each iteration