View Source Loupe.Stream.Context (Loupe v0.10.0)

Context to work with Stream filtering

Link to this section Summary

Functions

Applies AST options in the context to prevent carrying the ast around

Creates a new context

Puts variable in context

Link to this section Types

@type comparator() :: module()
@type option() :: {:comparator, comparator()}
@type t() :: %Loupe.Stream.Context{
  comparator: comparator(),
  parameters: Loupe.Language.Ast.parameters(),
  variables: map()
}

Link to this section Functions

@spec apply_ast(t(), Loupe.Language.Ast.t()) :: t()

Applies AST options in the context to prevent carrying the ast around

@spec new([option()]) :: t()

Creates a new context

Link to this function

put_variables(context, new_variables)

View Source
@spec put_variables(t(), map()) :: t()

Puts variable in context