NAME

Erlang::Parser::Node::Receive - a receive statement

DESCRIPTION

Receives a message from the mailbox which matches any pattern (and guard); optionally with a timeout.

Accessors

alts

A list of Erlang::Parser::Node::Alts which are matched against the process mailbox.

aft

An optional Erlang::Parser::Node::ReceiveAfter.

Methods

print

Pretty-prints the node to its filehandle argument.

EXAMPLE

receive
	{X, Y} when is_bool(X) ->
		X;
	{X, Y, Z} ->
		Y + Z;
	_ ->
		io:format("wth~n", [])
after
	10000 ->
		{error, timeout}
end