================== @if statement ================== @fn show(x: bool) { @if x {
Yes
} } --- (template (template_element (function_definition (identifier) (parameter_list (parameter (identifier) (rust_type (primitive_type)))) (content_block (template_node (template_control_flow (if_statement (expression (primary_expression (rust_path))) (content_block (template_node (html_element (tag_name) (template_node (text_content)) (tag_name))))))))))) ================== @for loop ================== @fn loop(items: Veczero
}, _ => {other
} } } --- (template (template_element (function_definition (identifier) (parameter_list (parameter (identifier) (rust_type (primitive_type)))) (content_block (template_node (template_control_flow (match_statement (expression (primary_expression (rust_path))) (match_arm (pattern (literal (number_literal (integer_literal)))) (content_block (template_node (html_element (tag_name) (template_node (text_content)) (tag_name))))) (match_arm (pattern (wildcard_pattern)) (content_block (template_node (html_element (tag_name) (template_node (text_content)) (tag_name)))))))))))) ================== @if in HTML attribute position ================== @fn cb(active: bool) { } --- (template (template_element (function_definition (identifier) (parameter_list (parameter (identifier) (rust_type (primitive_type)))) (content_block (template_node (html_element (tag_name) (attribute_or_control (attribute_control_flow (attribute_if_statement (expression (primary_expression (rust_path))) (attribute_or_control (html_attribute (attribute_name))))))))))))