public <T> Loop(final Expression<?> expr, final SectionNode node) {
assert expr != null;
assert node != null;
if (Container.class.isAssignableFrom(expr.getReturnType())) {
final ContainerType type = expr.getReturnType().getAnnotation(ContainerType.class);
if (type == null)
throw new SkriptAPIException(expr.getReturnType().getName() + " implements Container but is missing the required @ContainerType annotation");
this.expr = new ContainerExpression(expr, type.value());
} else {
this.expr = expr;
}
ScriptLoader.currentSections.add(this);
ScriptLoader.currentLoops.add(this);