Skip to content

Commit

Permalink
Clarify docstring of rewrite macro (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
odow authored Sep 1, 2023
1 parent e3f1da6 commit 01cae64
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/rewrite.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@
# one at http://mozilla.org/MPL/2.0/.

"""
@rewrite(expr; move_factors_into_sums = false)
@rewrite(expr, move_factors_into_sums = false)
Return the value of `expr`, exploiting the mutability of the temporary
expressions created for the computation of the result.
If you have an `Expr` as input, use [`rewrite_and_return`](@ref) instead.
See [`rewrite`](@ref) for an explanation of the keyword argument.
!!! info
Passing `move_factors_into_sums` after a `;` is not supported. Use a `,`
instead.
"""
macro rewrite(args...)
@assert 1 <= length(args) <= 2
Expand Down

0 comments on commit 01cae64

Please sign in to comment.