Sorry for trolling, but... Why not just walk the tree "by hand"? Just have a method that takes an AST parameter, and checks its type. If it's a type you want to handle, do your thing. If not, make recursive calls for each of the children. That seems like the cleanest and easiest solution to me. Andy