View Source Hologram.Compiler.AST (hologram v0.2.0)

Summary

Functions

Given Elixir source code returns its normalized Elixir AST.

Returns normalized AST of the given module. Specifying the module's BEAM path makes the call faster.

Types

t()

@type t() :: Macro.t()

Functions

for_code(code)

@spec for_code(binary()) :: t()

Given Elixir source code returns its normalized Elixir AST.

Examples

iex> for_code("1 + 2")
{:+, [line: 1], [1, 2]}

for_module(module, beam_path \\ nil)

@spec for_module(module(), charlist() | nil) :: t()

Returns normalized AST of the given module. Specifying the module's BEAM path makes the call faster.