Macro.generate_arguments
You're seeing just the function
generate_arguments
, go back to Macro module for more information.
Specs
generate_arguments(0, context :: atom()) :: []
generate_arguments(pos_integer(), context) :: [{atom(), [], context}, ...] when context: atom()
Generates AST nodes for a given number of required argument
variables using Macro.var/2
.
Note the arguments are not unique. If you later on want
to access the same variables, you can invoke this function
with the same inputs. Use generate_unique_arguments/2
to
generate a unique arguments that can't be overridden.
Examples
iex> Macro.generate_arguments(2, __MODULE__)
[{:arg1, [], __MODULE__}, {:arg2, [], __MODULE__}]