STEx.Parser (STEx v0.4.5) 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 = STEx.Parser.parse(s)
...> STEx.ST.st_to_string(session_type)
"rec Y.(+{!Hello(number, [{boolean, atom}]).Y, !Ok()})"