Reach.Frontend.Erlang (Reach v2.3.4)

Copy Markdown View Source

Translates Erlang abstract forms into Reach IR nodes.

Parses Erlang source via :epp.parse_file/2 and translates the abstract format into the same IR used by the Elixir frontend.

Summary

Functions

Parses an Erlang source file and returns the IR.

Parses an Erlang source string and returns the IR.

Functions

parse_file(path, opts \\ [])

@spec parse_file(
  Path.t(),
  keyword()
) :: {:ok, [Reach.IR.Node.t()]} | {:error, term()}

Parses an Erlang source file and returns the IR.

parse_string(source, opts \\ [])

@spec parse_string(
  String.t(),
  keyword()
) :: {:ok, [Reach.IR.Node.t()]} | {:error, term()}

Parses an Erlang source string and returns the IR.

translate_form(form, counter, file)