exfmt v0.2.0 Exfmt.Context

Link to this section Summary

Functions

Create a new Context

Push a new value onto the stack, signifying another layer in the code

Link to this section Types

Link to this type stack_layer()
stack_layer() :: atom
Link to this type t()
t() :: %Exfmt.Context{opts: Inspect.Opts.t, stack: [stack_layer]}

Link to this section Functions

Link to this function new()
new() :: t

Create a new Context.

Link to this function push_stack(ctx, value)
push_stack(t, stack_layer) :: t

Push a new value onto the stack, signifying another layer in the code.

iex> new().stack
[]

iex> ctx = new() |> push_stack(:call)
...> ctx.stack
[:call]

iex> ctx = new() |> push_stack(:call) |> push_stack(:list)
...> ctx.stack
[:list, :call]