liquex v0.2.1 Liquex.Context View Source

Stores contextual information for the parser

Link to this section Summary

Functions

Assign a new variable to the context

Create a new Context.t using predefined variables map

Link to this section Types

Link to this type

t()

View Source
t() :: %Liquex.Context{
  cycles: map(),
  filter_module: module(),
  private: map(),
  render_module: module() | nil,
  variables: map()
}

Link to this section Functions

Link to this function

assign(context, key, value)

View Source
assign(t(), String.t(), any()) :: t()

Assign a new variable to the context

Set a variable named key with the given value in the current context

Link to this function

new(variables)

View Source
new(map()) :: t()

Create a new Context.t using predefined variables map

Returns a new, initialized context object