pelecanus v0.4.0 Pelecanus.State

Statement of parser.

Link to this section Summary

Functions

[deprecated] Constructor of parsing state

Returns rest of input string

Link to this section Types

Link to this type t()
t() :: %Pelecanus.State{
  context: term(),
  offset: non_neg_integer(),
  str: String.t()
}

Link to this section Functions

Link to this function init(string)
init(String.t()) :: t()

[deprecated] Constructor of parsing state.

This function returns a state which contains given string. Initial context is %{}, offset is 0.

You can pass content option to set initial context.

Link to this function rest(state)
rest(t()) :: String.t()

Returns rest of input string.

Consider that offset is the number of Unicode graphemes, not codepoints.