YAMLScript (yamlscript v0.2.27)

Copy Markdown View Source

Elixir binding/API for the libys shared library.

This module is an Elixir port of the Python 'yamlscript' module, the reference implementation for YAMLScript FFI bindings to libys.

The load/1 function takes a YAMLScript string as input and returns {:ok, data} where data is the value the YAMLScript code evaluates to, or {:error, message}. The load!/1 variant returns the data directly and raises YAMLScript.Error on failure.

Summary

Functions

Compile and eval a YAMLScript string and return the result.

Like load/1 but returns the data directly and raises YAMLScript.Error on failure.

Functions

load(input)

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

Compile and eval a YAMLScript string and return the result.

load!(input)

@spec load!(String.t()) :: term()

Like load/1 but returns the data directly and raises YAMLScript.Error on failure.