File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -508,13 +508,11 @@ defmodule Macro do
508508 Generates AST nodes for a given number of required argument
509509 variables using `Macro.unique_var/2`.
510510
511+ The second argument is generally the macro caller's module.
512+
511513 ## Examples
512514
513- iex> [var1, var2] = Macro.generate_unique_arguments(2, __MODULE__)
514- iex> {:arg1, [counter: c1], __MODULE__} = var1
515- iex> {:arg2, [counter: c2], __MODULE__} = var2
516- iex> is_integer(c1) and is_integer(c2)
517- true
515+ [var1, var2] = Macro.generate_unique_arguments(2, __CALLER__.module)
518516
519517 """
520518 @ doc since: "1.11.3"
@@ -570,11 +568,11 @@ defmodule Macro do
570568 generate another variable, with its own unique counter.
571569 See `var/2` for an alternative.
572570
571+ The second argument is generally the macro caller's module.
572+
573573 ## Examples
574574
575- iex> {:foo, [counter: c], __MODULE__} = Macro.unique_var(:foo, __MODULE__)
576- iex> is_integer(c)
577- true
575+ var = Macro.unique_var(:foo, __CALLER__.module)
578576
579577 """
580578 @ doc since: "1.11.3"
You can’t perform that action at this time.
0 commit comments