ElixirST.Parser (ElixirST v0.6.1) View Source

Parses an input string to session types (as Elixir data).

Link to this section Summary

Functions

Parses a string into a session type data structure

Link to this section Functions

Specs

parse(bitstring() | charlist()) :: session_type()

Parses a string into a session type data structure

Example

iex> s = "rec Y.(+{!Hello(number, [{boolean, atom}]).Y, !Ok()})"
...> session_type = ElixirST.Parser.parse(s)
...> ElixirST.ST.st_to_string(session_type)
"rec Y.(+{!Hello(number, [{boolean, atom}]).Y, !Ok()})"