Visitor.pm

Anarres-Mud-Driver-0.26/lib/Driver/Compiler/Visitor.pm · 358 B

From the archive Anarres-Mud-Driver-0.26.tar.gz

Download the archive   « Back to the archive contents

package Anarres::Mud::Driver::Compiler::Visitor;

use strict;
use warnings;
use vars qw(@ISA);
use Exporter;

@ISA = qw(Exporter);

sub new {
	my $class = shift;
	my $self = ($#_ == 0) ? { %{ (shift) } } : { @_ };
	return bless $self, $class;
}

sub visit_child {
	my ($self, $node, $index) = @_;
	my $child = $node->value($index);
	$child->accept($self);
}

Site Stats

Snippets: 1791
Codebases: 571