blob: 1a9f1a64a97fcb453e08000f20d0db6fc8ab9c56 [file] [log] [blame]
package KorAP::XML::Tokenizer::Match;
use strict;
use warnings;
sub new {
bless {}, shift;
};
sub set {
$_[0]->{$_[1] . ':' . $_[2]} = $_[3];
$_[0]->{'[' . $_[1]} = $_[3];
$_[0]->{$_[2] . ']'} = $_[3];
};
sub lookup {
return undef unless defined $_[1] && defined $_[2];
$_[0]->{$_[1] . ':' . $_[2]} // undef;
};
sub startswith {
return undef unless defined $_[1];
$_[0]->{'[' . $_[1]} // undef;
};
sub endswith {
return undef unless defined $_[1];
$_[0]->{$_[1] . ']'} // undef;
};
1;