Mau.Parser.Tag (mau v0.8.0)
View SourceTag parsing for the Mau template engine.
Handles parsing of template tags within {% %} blocks:
- Assignment tags (assign)
- Conditional tags (if, elsif, else, endif)
- Loop tags (for, endfor)
Summary
Functions
Assignment tag parsing - {% assign variable = expression %}.
Else tag parsing - {% else %}.
Elsif tag parsing - {% elsif condition %}.
Endfor tag parsing - {% endfor %}.
Endif tag parsing - {% endif %}.
For tag parsing - {% for item in collection %}.
If tag parsing - {% if condition %}.
Functions
Assignment tag parsing - {% assign variable = expression %}.
Requires: basic_identifier, pipe_expression, optional_whitespace, required_whitespace from the main parser context.
Else tag parsing - {% else %}.
Elsif tag parsing - {% elsif condition %}.
Requires: pipe_expression, required_whitespace from the main parser context.
Endfor tag parsing - {% endfor %}.
Endif tag parsing - {% endif %}.
For tag parsing - {% for item in collection %}.
Requires: basic_identifier, pipe_expression, required_whitespace from the main parser context.
If tag parsing - {% if condition %}.
Requires: pipe_expression, required_whitespace from the main parser context.