Ancora.Derive.Extract (ancora v1.0.0-rc.1)

Copy Markdown View Source

Extracts source-ordered clauses for one module, function, and arity.

Default arguments expand to every callable arity. Attributes adjacent to a definition are not part of the returned clause list.

Summary

Functions

Extracts clauses for binding from an already quoted AST.

Parses source and extracts every clause for binding.

Types

binding()

@type binding() :: Ancora.Derive.binding()

Functions

clauses(ast, arg)

@spec clauses(Macro.t(), binding()) :: [Macro.t()]

Extracts clauses for binding from an already quoted AST.

clauses(source, path, binding)

@spec clauses(binary(), Path.t(), binding()) :: {:ok, [Macro.t()]} | {:error, term()}

Parses source and extracts every clause for binding.