Search documentation of Metastatic

# Metastatic.Adapters.Erlang.ToMeta (Metastatic v0.2.0)

View Source

Transform Erlang AST (M1) to MetaAST (M2).

This module implements the abstraction function α_Erlang that lifts Erlang-specific AST structures to the meta-level representation.

## Erlang AST Patterns

Erlang uses a consistent tuple-based format:

- Literals: `{type, line, value}`
- Variables: `{:var, line, name}`
- Binary ops: `{:op, line, op, left, right}`
- Calls: `{:call, line, func, args}`

## Metadata Preservation

The transformation preserves M1-specific information:

- `:line` - line number from source
- `:erlang_form` - original Erlang construct type

# Summary

## Functions

transform(unsupported)

Transform Erlang AST to MetaAST.

# Functions

# transform(unsupported)

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

Transform Erlang AST to MetaAST.

Returns `{:ok, meta_ast, metadata}` on success or `{:error, reason}` on failure.