Structure
MTLIfStatement
A conditional statement for branching logic.
struct MTLIfStatement
Overview
If statements provide conditional execution in MTL templates, supporting if/elseif/else chains for complex branching logic.
Topics
Operators
?
Initializers
?
init(condition:thenBlock:elseIfBlocks:elseBlock:multiLines:)
Creates a new if statement.
Instance Properties
V
condition
The condition expression.
V
elseBlock
Optional else block.
V
elseIfBlocks
Optional elseif conditions and blocks.
V
multiLines
Whether this statement spans multiple lines.
V
thenBlock
The block to execute if the condition is true.
Instance Methods
F
execute(in:)
Executes the statement within the specified execution context.