Metastatic.Adapters.Cure
(Metastatic v0.20.3)
View Source
Metastatic adapter for the Cure programming language.
Transforms Cure source code to/from MetaAST representation using Cure's lexer and parser pipeline.
Usage
{:ok, doc} = Metastatic.Adapter.abstract(Metastatic.Adapters.Cure, source, :cure)
{:ok, source} = Metastatic.Adapter.reify(Metastatic.Adapters.Cure, doc)
Summary
Functions
Parse Cure source code into a MetaAST Document.
Convert a Cure MetaAST Document back to Cure source.
Round-trip: parse source to MetaAST, then back to source.
Functions
@spec abstract(String.t(), atom(), keyword()) :: {:ok, Metastatic.Document.t()} | {:error, term()}
Parse Cure source code into a MetaAST Document.
@spec reify(Metastatic.Document.t()) :: {:ok, String.t()} | {:error, term()}
Convert a Cure MetaAST Document back to Cure source.
Round-trip: parse source to MetaAST, then back to source.