Diesel.Generator behaviour (diesel v0.7.2)

Generators produce actual Elixir code from DSLs.

Given a definition, a generator returns one or multiple quoted expressions.

The following info are passed in the keyword list of options:

  • :otp_app
  • :caller_module

Summary

Callbacks

Link to this callback

generate(definition, opts)

@callback generate(definition :: term(), opts :: Keyword.t()) :: Macro.t() | [Macro.t()]