Diesel.Parser behaviour (diesel v0.5.8)

A parser is a DSL tranformation step before code generation

Example:

def parse(caller_module, {:music, attrs, children}) do
  # eg return some struct here
end

Parsing a definition is an optional step.

Summary

Functions

Returns a built-in parser, given its name

Callbacks

Link to this callback

parse(caller_module, definition)

@callback parse(caller_module :: module(), definition :: term()) :: term()

Functions

Returns a built-in parser, given its name

Supported names:

  • strip_root