pelecanus v0.1.0 Pelecanus.State
Statement of parser.
State create an linked agent for storing input string. Passing reference, it is hoped for that memoization work better.
Link to this section Summary
Link to this section Types
Link to this type
t()
t() :: %Pelecanus.State{ context: term(), offset: non_neg_integer(), ref: identifier() }
Link to this section Functions
Constructor of parsing state.
This function create an agent store given string and state refer him.
Initial context is %{}
, offset is 0
The agent link to caller process.
Returns rest of input string.
Consider that offset is the number of Unicode graphemes, not codepoints.