ForStatement class
Represents a 'for' loop over an iterable.
Constructors
-
ForStatement(int pos, Expression loopVar, Expression iterable, List<
Statement> body, List<Statement> defaultBlock)
Properties
-
body
→ List<
Statement> -
The statements to execute for each item.
final
-
defaultBlock
→ List<
Statement> -
Optional statements to execute if the iterable is empty.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- iterable → Expression
-
The expression that evaluates to an iterable object.
final
- loopVar → Expression
-
The variable(s) to bind to each item in the iteration.
final
- pos → int
-
The starting position of the statement in the source text.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → String
-
Returns the type name of the statement.
no setteroverride
Methods
-
execute(
Context ctx) → JinjaValue -
Executes the statement within the given
ctxand returns the result as a JinjaValue.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited