Skip to content

Commit

Permalink
Minor comments fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jad-hamza committed Feb 18, 2021
1 parent d94cfd6 commit 2314122
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/scala/inox/ast/GenTreeOps.scala
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ trait GenTreeOps { self =>
* }}}
* will yield:
* {{{
* Add(a, d) // And not Add(a, f) because it only substitute once for each level.
* Add(a, d) // And not Add(a, f) because it only substitutes once for each level.
* }}}
*
* - If applyRec is true, it will substitute multiple times on each level:
Expand All @@ -147,18 +147,18 @@ trait GenTreeOps { self =>
* Add(a, f)
* }}}
*
* @note The mode with applyRec true can diverge if f is not well formed
* @note The function can diverge whether `applyRec` is true or false
*/
def preMap(f: Source => Option[Source], applyRec : Boolean = false)(e: Source): Target = {
def g(t: Source, u: Unit): (Option[Source], Unit) = (f(t), ())
preMapWithContext[Unit](g, applyRec)(e, ())
}


/** Post-transformation of the tree.
*
* Takes a partial function of replacements.
* Substitutes '''after''' recurring down the trees.
* Substitutes '''after''' recursing down the trees.
*
* Supports two modes :
*
Expand Down

0 comments on commit 2314122

Please sign in to comment.