View Source Surface.AST.Attribute (surface v0.11.4)

An AST node representing an attribute or property

Properties

* `:type` - an atom representing the type of attribute. See Surface.API for the list of supported types
* `:type_opts` - a keyword list of options for the type
* `:name` - the name of the attribute (e.g. `:class`)
* `:root` - true if the attribute was defined using root notation `{ ... }`. Root attributes won't have `name`.
* `:value` - a list of nodes that can be concatenated to form the value for this attribute. Potentially contains dynamic data
* `:meta` - compilation meta data

Summary

Types

@type t() :: %Surface.AST.Attribute{
  meta: Surface.AST.Meta.t(),
  name: atom() | nil,
  root: boolean() | nil,
  type: atom() | nil,
  type_opts: keyword() | nil,
  value: Surface.AST.Literal.t() | Surface.AST.AttributeExpr.t()
}