View Source Surface.AST.If (surface v0.11.0)

An AST node representing an if/else expression

properties

Properties

* `:condition` - a quoted expression
* `:children` - the children to insert into the dom if the condition evaluates truthy
* `:else` - the children to insert into the dom if the condition evaluates falsy
* `:meta` - compilation meta data
* `:debug` - keyword list indicating when debug information should be printed during compilation
* `:directives` - directives associated with this node

Link to this section Summary

Link to this section Types

@type t() :: %Surface.AST.If{
  children: [Surface.AST.t()],
  condition: Surface.AST.AttributeExpr.t(),
  debug: [atom()],
  directives: [Surface.AST.Directive.t()],
  else: [Surface.AST.t()],
  meta: Surface.AST.Meta.t()
}