DSL.Source (dsl v0.1.1)

Copy Markdown View Source

Source location metadata for DSL diagnostics.

Summary

Functions

Build and escape source metadata for injection into quoted code.

Build source location metadata from a macro caller environment.

Types

t()

@type t() :: %DSL.Source{
  column: pos_integer() | nil,
  file: String.t() | nil,
  line: pos_integer() | nil
}

Functions

escape_caller(caller)

@spec escape_caller(Macro.Env.t()) :: Macro.t()

Build and escape source metadata for injection into quoted code.

from_caller(caller)

@spec from_caller(Macro.Env.t()) :: t()

Build source location metadata from a macro caller environment.