DotPrompt.Compiler.Context (anantha_dot_prompt v1.1.0)

Copy Markdown

Context struct for the dot-prompt compiler to reduce function arity.

Summary

Types

t()

@type t() :: %DotPrompt.Compiler.Context{
  current_dir: String.t(),
  declarations: map(),
  files_meta: map(),
  fragment_defs: map(),
  indent_level: integer(),
  opts: keyword(),
  params: map(),
  section_count: integer(),
  used_vars: MapSet.t(),
  vary_map: map()
}

Functions

add_used_var(ctx, var)

increment_indent(ctx)

increment_section(ctx)

merge_files(ctx, new_files)

new(params, fragment_defs, declarations, opts \\ [])

put_vary(ctx, name, branches)