Skip to content

Instantly share code, notes, and snippets.

@johannegger
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johannegger/051a6c125b00c412951f to your computer and use it in GitHub Desktop.
Save johannegger/051a6c125b00c412951f to your computer and use it in GitHub Desktop.
import scala.meta.internal.ast._
import scala.meta.tql._
def message(tree: Tree) = s"found culprit at line ${tree.position.start.line}"
val tryMatcher = collect{
case tr: Term.TryWithCases => message(tr)
case tr: Term.TryWithTerm => message(tr)
}.topDown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment