What's the best way to recursively search for an element in scala 2.10 ASTs?
The trees might be a result of power.trees(code)
or mirror.mkToolBox().parseExpr(code)
Edit. In 2.10.0-RC1 parseExpr
has been renamed to parse
.
The concrete use-case that I have is extracting the code of a method from a given class/object code by method name, but I assume that the question would be more relevant for others if formulated in a more generic way.