TernaryExpression class
Represents a ternary conditional expression (e.g., a if cond else b).
- Inheritance
-
- Object
- Statement
- Expression
- TernaryExpression
Constructors
- TernaryExpression(int pos, Expression condition, Expression trueExpr, Expression falseExpr)
Properties
- condition → Expression
-
The condition to evaluate.
final
- falseExpr → Expression
-
The result if the condition is false.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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
- trueExpr → Expression
-
The result if the condition is true.
final
- 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