Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (29 sloc) 1.003 kb
class QAST::Op is QAST::Node {
has str $!name;
has str $!op;
has str $!childorder;
method name(*@value) { $!name := @value[0] if @value; $!name || "" }
method op(*@value) { $!op := @value[0] if @value; $!op }
method childorder(*@value) { $!childorder := @value[0] if @value; $!childorder || "" }
method substitute_inline_placeholders(@fillers) {
my $result := self.shallow_clone();
my $i := 0;
my $elems := +@(self);
while $i < $elems {
$result[$i] := self[$i].substitute_inline_placeholders(@fillers);
$i := $i + 1;
}
$result
}
method evaluate_unquotes(@unquotes) {
my $result := self.shallow_clone();
my $i := 0;
my $elems := +@(self);
while $i < $elems {
$result[$i] := self[$i].evaluate_unquotes(@unquotes);
$i := $i + 1;
}
$result
}
method dump_extra_node_info() { "$!op $!name"; }
}
Jump to Line
Something went wrong with that request. Please try again.