Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add Tree::Optimizer::Pass.transformer-class method to simplify subcla…

…ssing.
  • Loading branch information...
commit 34eb2678348c7e6bf154c31b698c3af83db3517b 1 parent 2cc3e32
tcurtis authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/Tree/Optimizer/Pass.nqp
View
6 src/Tree/Optimizer/Pass.nqp
@@ -68,10 +68,14 @@ method run ($tree) {
}
}
+method transformer-class () {
+ Tree::Optimizer::Transformer::Single;
+}
+
method generate-transformer () {
if pir::defined__IP($!when) {
$!when.transformer_class.new($!when, $!transformation);
} else {
- Tree::Optimizer::Transformer::Single.new($!transformation);
+ self.transformer-class.new($!transformation);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.