Adze.Outline (Adze v0.1.0)

Copy Markdown View Source

Parse Elixir source and return its structural outline.

Each top-level defmodule becomes a node with its children: defs, defmacros, attributes, directives, defstructs, nested modules. Every node carries a line range so callers can Read just the bytes they need.

Summary

Types

definition()

@type definition() :: map()

Functions

outline(source, opts \\ [])

@spec outline(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, term()}

outline_file(path)

@spec outline_file(Path.t()) :: {:ok, map()} | {:error, term()}