Skip to content

Commit

Permalink
Added scaladoc for new function byNameExpr in DiagrammedExpr.scala.
Browse files Browse the repository at this point in the history
  • Loading branch information
cheeseng committed Dec 29, 2022
1 parent 091481b commit 90356ce
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Expand Up @@ -59,6 +59,14 @@ object DiagrammedExpr {
*/
def simpleExpr[T](expression: T, anchor: Int): DiagrammedExpr[T] = new DiagrammedSimpleExpr(expression, anchor)

/**
* Create by-name <code>DiagrammedExpr</code> that wraps <code>by-name</code> or <code>Function</code> expression.
* The created <code>DiagrammedExpr</code> will not be displayed in the diagram as value.
*
* @param expression the by-name expression value
* @param anchor the anchor of the expression
* @return a by-name <code>DiagrammedExpr</code>
*/
def byNameExpr[T](expression: => T, anchor: Int): DiagrammedExpr[T] = new DiagrammedByNameExpr(expression, anchor)

/**
Expand Down
Expand Up @@ -59,6 +59,14 @@ object DiagrammedExpr {
*/
def simpleExpr[T](expression: T, anchor: Int): DiagrammedExpr[T] = new DiagrammedSimpleExpr(expression, anchor)

/**
* Create by-name <code>DiagrammedExpr</code> that wraps <code>by-name</code> or <code>Function</code> expression.
* The created <code>DiagrammedExpr</code> will not be displayed in the diagram as value.
*
* @param expression the by-name expression value
* @param anchor the anchor of the expression
* @return a by-name <code>DiagrammedExpr</code>
*/
def byNameExpr[T](expression: => T, anchor: Int): DiagrammedExpr[() => T] = new DiagrammedByNameExpr(() => expression, anchor)

/**
Expand Down

0 comments on commit 90356ce

Please sign in to comment.