Evaluates an expression to an iterable Starlark value and returns an Iterable view of it. If evaluation fails or the value is not iterable, throws EvalException and sets the error location to the expression's start.
(StarlarkThread.Frame fr, Expression expr)
| 943 | * error location to the expression's start. |
| 944 | */ |
| 945 | private static Iterable<?> evalAsIterable(StarlarkThread.Frame fr, Expression expr) |
| 946 | throws EvalException, InterruptedException { |
| 947 | Object o = eval(fr, expr); |
| 948 | try { |
| 949 | return Starlark.toIterable(o); |
| 950 | } catch (EvalException ex) { |
| 951 | fr.setErrorLocation(expr.getStartLocation()); |
| 952 | throw ex; |
| 953 | } |
| 954 | } |
| 955 | |
| 956 | private static final Object[] EMPTY = {}; |
| 957 | } |
no test coverage detected