Erl2ex v0.0.1 Erl2ex

Erl2ex is an Erlang to Elixir transpiler, converting well-formed Erlang source to Elixir source with equivalent functionality.

The goal is to produce correct, functioning Elixir code, but not necessarily perfectly idiomatic. This tool may be used as a starting point when porting code from Erlang to Elixir, but manual cleanup will likely be desired.

This module provides the main entry points into Erl2ex.

Summary

Functions

Searches a directory for Erlang source files, and writes Elixir soure files for each module

Converts an Erlang source file, and writes the Elixir source to a new file

Converts the source for an Erlang module, represented as a string, and returns the Elixir source as a string

Types

options :: list
result :: :ok | :error

Functions

convert_dir(source_dir, dest_dir \\ nil, opts \\ [])

Specs

convert_dir(Path.t, Path.t, options) :: result

Searches a directory for Erlang source files, and writes Elixir soure files for each module.

convert_file(source_path, dest_path \\ nil, opts \\ [])

Specs

convert_file(Path.t, Path.t, options) :: result

Converts an Erlang source file, and writes the Elixir source to a new file.

You must provide the relative or absolute path to the Erlang source. You may optionally provide a path to the Elixir destination. If the destination is not specified, the result will be written in the same directory as the source.

convert_str(source, opts \\ [])

Specs

convert_str(String.t, options) :: String.t

Converts the source for an Erlang module, represented as a string, and returns the Elixir source as a string.