^ \s* go \s
/xmi;
- $opt{node_types} = +{
- map +("-$_" => '_render_'.$_),
- qw(op func bind ident literal list)
+ $opt{render} = {
+ (map +("-$_", "_render_$_"), qw(op func bind ident literal list)),
+ %{$opt{render}||{}}
};
$opt{expand_unary} = {};
my ($self, $aqt) = @_;
my ($k, $v, @rest) = %$aqt;
die "No" if @rest;
- if (my $meth = $self->{node_types}{$k}) {
+ if (my $meth = $self->{render}{$k}) {
return $self->$meth($v);
}
die "notreached: $k";
if (my $custom = $self->{expand_unary}{$k}) {
return $self->$custom($v);
}
- if ($self->{node_types}{$k}) {
+ if ($self->{render}{$k}) {
return { $k => $v };
}
if (