From 788e28d18ac15bcd958420d213052a7d04303fdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Thu, 13 May 2021 10:14:03 +0100 Subject: [PATCH] Allow `while`-block in at-animate macro --- src/animation.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/animation.jl b/src/animation.jl index 3c55967c..cb09e527 100644 --- a/src/animation.jl +++ b/src/animation.jl @@ -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