The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Language::Tea::Traverse - Iterates into the Tea Op Tree

SYNOPSIS

  use Language::Tree::Traverse;
  my $node = traverse_postfix($root, sub { }, []);
  my $node = traverse_prefix($root, sub { }, []);

DESCRIPTION

This module iterates through the tree in two different ways

traverse_postfix($node, $visitor = sub { my ($node, \@children, @_) = @_ });

Bottom-up traversal. The visitor will receive both the current node and the result of the processing for each sub-node. As any other arguments passed to traverse_postfix.

traverse_prefix($node, $visitor = sub { my ($node, \@parents, @_) = @_ });

Top-Down traversal. The visitor will receive both the current node and the result of the processing for each upper level in the three (from the closest to the farest). It will also receive any other argument passed to traverse_prefix.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 127:

=over without closing =back