Batata.Frontend (batata v0.1.0)

Copy Markdown View Source

Normalized boundary for already-expanded Elixir modules.

This module deliberately does not implement macro expansion or compile-time semantics: it records a normalized module snapshot so later phases can consume function clauses without owning them (the frontend boundary).

Summary

Functions

Normalizes an already-parsed defmodule AST.

Parses source text and normalizes the resulting module AST.

Functions

from_ast(arg)

@spec from_ast(Macro.t()) :: Batata.Frontend.Module.t()

Normalizes an already-parsed defmodule AST.

from_source(source)

@spec from_source(String.t()) :: Batata.Frontend.Module.t()

Parses source text and normalizes the resulting module AST.

This parses only. It does not call Macro.expand/2 or the Elixir compiler.