weechat-parser v0.1.1 Parser View Source
Link to this section Summary
Functions
Parses the given binary
as join.
Parses the given binary
as leave.
Parses the given binary
as me.
Parses the given binary
as message.
Link to this section Functions
join(binary, opts \\ [])
View Sourcejoin(binary(), keyword()) :: {:ok, [term()], rest, context, line, byte_offset} | {:error, reason, rest, context, line, byte_offset} when line: {pos_integer(), byte_offset}, byte_offset: pos_integer(), rest: binary(), reason: String.t(), context: map()
Parses the given binary
as join.
Returns {:ok, [token], rest, context, position, byte_offset}
or
{:error, reason, rest, context, line, byte_offset}
where position
describes the location of the join (start position) as {line, column_on_line}.
Options
:line
- the initial line, defaults to 1:byte_offset
- the initial byte offset, defaults to 0:context
- the initial context value. It will be converted to a map
leave(binary, opts \\ [])
View Sourceleave(binary(), keyword()) :: {:ok, [term()], rest, context, line, byte_offset} | {:error, reason, rest, context, line, byte_offset} when line: {pos_integer(), byte_offset}, byte_offset: pos_integer(), rest: binary(), reason: String.t(), context: map()
Parses the given binary
as leave.
Returns {:ok, [token], rest, context, position, byte_offset}
or
{:error, reason, rest, context, line, byte_offset}
where position
describes the location of the leave (start position) as {line, column_on_line}.
Options
:line
- the initial line, defaults to 1:byte_offset
- the initial byte offset, defaults to 0:context
- the initial context value. It will be converted to a map
me(binary, opts \\ [])
View Sourceme(binary(), keyword()) :: {:ok, [term()], rest, context, line, byte_offset} | {:error, reason, rest, context, line, byte_offset} when line: {pos_integer(), byte_offset}, byte_offset: pos_integer(), rest: binary(), reason: String.t(), context: map()
Parses the given binary
as me.
Returns {:ok, [token], rest, context, position, byte_offset}
or
{:error, reason, rest, context, line, byte_offset}
where position
describes the location of the me (start position) as {line, column_on_line}.
Options
:line
- the initial line, defaults to 1:byte_offset
- the initial byte offset, defaults to 0:context
- the initial context value. It will be converted to a map
message(binary, opts \\ [])
View Sourcemessage(binary(), keyword()) :: {:ok, [term()], rest, context, line, byte_offset} | {:error, reason, rest, context, line, byte_offset} when line: {pos_integer(), byte_offset}, byte_offset: pos_integer(), rest: binary(), reason: String.t(), context: map()
Parses the given binary
as message.
Returns {:ok, [token], rest, context, position, byte_offset}
or
{:error, reason, rest, context, line, byte_offset}
where position
describes the location of the message (start position) as {line, column_on_line}.
Options
:line
- the initial line, defaults to 1:byte_offset
- the initial byte offset, defaults to 0:context
- the initial context value. It will be converted to a map