Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 43dd82e83e
Fetching contributors…

Cannot retrieve contributors at this time

40 lines (33 sloc) 0.779 kb
use v6;
# See also: parrot/compilers/pge/PGE/Match.pir
# XXX - class name - fix Perlito::Emitter::Token to emit 'Perlito::Runtime::Match' instead
class Perlito::Perl5::Match {
has $.str;
has $.array;
has $.hash;
has $.result_object;
has $.from;
has $.to;
has $.bool;
method scalar {
if $.bool {
return undef;
};
if defined( $.result_object ) {
return $.result_object;
};
return substr( $.str, $.from, ( $.to - $.from ) + 1 );
};
method __get_bool {
return $.bool;
};
method __get_int {
return 0 + self.scalar;
};
method __get_number {
return 0 + self.scalar;
};
method __get_string {
return self.scalar;
};
}
Jump to Line
Something went wrong with that request. Please try again.