Reference
Contents
Index
ModuleMixins.substitute_top_level
— Methodsubstitute_top_level(var, val, mod, expr)
Takes a syntax object expr
and substitutes every occurence of module var
for val
, only if the resulting object is actually present in module mod
. The mod
module should correspond with a lookup of val
in the caller's namespace.
ModuleMixins.@compose
— Macro@compose module Name
[@mixin Parents, ...]
...
end
Creates a new composable module Name
. Structs inside this module are merged with those of the same name in Parents
.
ModuleMixins.@for_each
— Macro@for_each(M -> M.method(), lst::Vector{Symbol})
Calls method()
for each module in lst
that actually implements that method. Here lst
should be a vector of symbols that are all in the current module's namespace.
ModuleMixins.@spec
— Macro@spec module *name*
*body*...
end
Create a spec. The @spec
macro itself doesn't perform any operations other than creating a module and storing its own AST as const *name*.AST
.
This macro is only here for teaching purposes.