Metastatic.Adapters.Agda.Subprocess (Metastatic v0.33.0)

View Source

Manages subprocess communication with the Agda parser.

Uses the compiled parser binary built from priv/parsers/agda/.

Summary

Functions

Parse Agda source code by invoking the Agda parser subprocess.

Functions

parse(source)

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

Parse Agda source code by invoking the Agda parser subprocess.

Returns {:ok, ast} on success or {:error, reason} on failure.

Examples

iex> Metastatic.Adapters.Agda.Subprocess.parse("1 + 2")
{:ok, %{"type" => "infix", ...}}