Expand description
Canonical pretty-printer for -spec/-callback/-type right-hand sides.
The job: produce a single canonical string for any given semantic
signature, so reformatting in source produces no snapshot diff. The
algorithm is intentionally simple: it normalizes whitespace, balances
brackets, wraps at top-level | past a width target.
Functionsยง
- normalize_
elixir_ signature - Elixir entry point:
$is an ordinary byte in Elixir type text, so the char-literal-aware Erlang lexing must not apply. - normalize_
signature - Erlang entry point:
$cchar literals, triple-quoted strings, and sigils are lexed as such, so$"or$,cannot derail the walk.