Merge pull request #3497 from giordano/mg/animate-while

Allow `while`-block in at-animate macro
This commit is contained in:
Daniel Schwabeneder 2021-05-14 19:19:05 +02:00 committed by GitHub
commit 27764bbc67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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