Handles «value:if», «value:elsIf», «value:else» and «value:endIf» blocks.
Summary
Functions
Consumes the clauses of an if/elsIf/else chain.
Functions
@spec consume_clauses(Sablon.Processor.Document.OperationConstruction.t(), term()) :: {[map()], term(), Sablon.Processor.Document.OperationConstruction.t()}
Consumes the clauses of an if/elsIf/else chain.
Returns the conditional clauses, the else block (or nil) and the
updated construction state. A custom conditional handler can call this and
wrap the result in its own statement instead of Sablon.Statement.Condition.