The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Erlang::Parser::Node::Alt - an alternative in a case or try

DESCRIPTION

One alternative (the catch class (if any), pattern match, guards (if any) and expressions) in a case or try statement.

Accessors

catch

True if this is a case in a catch clause. If so, it will also possess the class attribute.

class

The class in the pattern match; the 'Z' in try X catch Y:Z -> ... end.

expr

The Erlang::Parser::Node pattern match expression.

whens

A Erlang::Parser::Node::WhenList of guard sequences/expressions, if any.

stmts

A list of Erlang::Parser::Nodes; the body executed for this alternative.

Methods

print

Pretty-prints the node to its filehandle argument.

EXAMPLE

        {X, Y} when is_bool(X) ->
                Z = Y + Y,
                Z * 2