Ergo.Context.ast_transform

You're seeing just the function ast_transform, go back to Ergo.Context module for more information.
Link to this function

ast_transform(ctx, fun)

Called to perform an arbitrary transformation on the AST value of a Context.

Examples

iex> alias Ergo.Context
iex> context = Context.new(&Ergo.Parser.call/2, "", ast: "Hello World")
iex> assert %Context{ast: "Hello World"} = Context.ast_transform(context, &Function.identity/1)

iex> alias Ergo.Context
iex> context = Context.new(&Ergo.Parser.call/2, "", ast: "Hello World")
iex> assert %Context{ast: 11} = Context.ast_transform(context, &String.length/1)

iex> alias Ergo.Context
iex> context = Context.new(&Ergo.Parser.call/2, "", ast: "Hello World")
iex> assert %Context{ast: "Hello World"} = Context.ast_transform(context, nil)