rocket_dyn_templates::tera

Module ast

Source
Expand description

The AST of Tera

Structs§

  • A block definition
  • An expression is a value that can be negated and followed by optional filters
  • A filter section node {{ filter name(param="value") }} content {{ endfilter }}
  • A forloop: can be over values or key/values
  • A function call, can be a filter or a global function
  • An if/elif/else condition with their respective body
  • Something that checks whether the left side is contained in the right side
  • A logical expression
  • A call to a namespaced macro macros::my_macro()
  • A Macro definition
  • A mathematical expression
  • Set a variable in the context {% set val = "hey" %}
  • Can only be a combination of string + ident or ident + ident
  • A test node if my_var is odd
  • Whether to remove the whitespace of a {% %} tag

Enums§

  • An expression is the node found in variable block, kwargs and conditions.
  • All logic operators
  • All math operators
  • All Tera nodes that can be encountered