Cooper.Interp.Text (Cooper v0.1.0)

Copy Markdown

A double-quoted string's content, once it's been found to contain at least one interpolation reference -- an ordered list of literal string runs and Cooper.Ref.* nodes. Cooper.Resolver resolves each segment and joins the results into the final string. A double-quoted string with no references at all is represented as a plain Elixir string instead (Cooper.Actions never wraps pure literal text in this struct) -- keeps the common case cheap and keeps existing scalar-string assumptions elsewhere intact.

Summary

Types

segment()

t()

@type t() :: %Cooper.Interp.Text{segments: [segment()]}