From adb9875dbcb42678128bd5c1e96668ea5fe3ef79 Mon Sep 17 00:00:00 2001 From: Manos Koukoutos <emmanouil.koukoutos@epfl.ch> Date: Mon, 17 Oct 2016 16:39:24 +0200 Subject: [PATCH] Add fundef.transform --- src/main/scala/inox/ast/TreeOps.scala | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/scala/inox/ast/TreeOps.scala b/src/main/scala/inox/ast/TreeOps.scala index 2b3d76eb1..b4af9cdc1 100644 --- a/src/main/scala/inox/ast/TreeOps.scala +++ b/src/main/scala/inox/ast/TreeOps.scala @@ -163,6 +163,17 @@ trait TreeTransformer { } } + final def transform(fd: s.FunDef): t.FunDef = { + new t.FunDef( + fd.id, + fd.tparams.map(tpd => t.TypeParameterDef(transform(tpd.tp).asInstanceOf[t.TypeParameter])), + fd.params.map(transform), + transform(fd.returnType), + transform(fd.fullBody), + fd.flags map transform + ) + } + protected trait TreeTransformerComposition extends TreeTransformer { protected val t1: TreeTransformer protected val t2: TreeTransformer { val s: t1.t.type } -- GitLab