Finds the modules of a parsed file and what the walk needs to know about each one:
its aliases, imports, local functions, whether it is a GenServer, its function
clauses in source order, the module-body expressions that run at compile time, and its
context: every module-body expression other than a function clause, a nested module
or a documentation attribute (what a function's behaviour may depend on besides its
own clauses: use, import, alias, attributes, defstruct), which
Juggernaut.Cache.Footprint hashes with each function.
A nested defmodule is a module of its own, named inside its parent. defimpl is
named Protocol.Target. Clause indices count every def, defp, defmacro and
defmacrop of one name and arity in source order, bodiless heads included
(design notes §6).
Summary
Functions
The name and arguments of a clause head (f(a), f(a) when g), or :error.
The modules defined in ast, outermost first, in source order.
Types
@type clause() :: %{ module: module(), kind: atom(), name: atom(), arity: arity(), index: non_neg_integer(), node: Macro.t(), impl?: boolean(), bodiless?: boolean(), first_line: pos_integer(), last_line: pos_integer() }