     }
   end
 
-  @doc """
-  Returns an empty string as the new buffer.
-  """
+  @doc false
   def handle_begin(state) do
     %{state | binary: [], dynamic: []}
   end
 
-  @doc """
-  End of the new buffer.
-  """
+  @doc false
   def handle_end(quoted) do
     handle_body(quoted)
   end
 
-  @doc """
-  The default implementation simply returns the given expression.
-  """
+  @doc false
   def handle_body(state) do
     %{binary: binary, dynamic: dynamic} = state
     binary = {:<<>>, [], Enum.reverse(binary)}

  @moduledoc ~S"""
  Basic EEx engine that ships with Elixir.

  An engine needs to implement six functions:

    * `init(opts)` - called at the beginning of every text
      and it must return the initial state.

    * `handle_body(state)` - receives the state of the document
      and it must return a quoted expression.

    * `handle_text(state, text)` - it receives the state,
      the text and must return a new quoted expression.

    * `handle_expr(state, marker, expr)` - it receives the state,
      the marker, the expr and must return a new state.

    * `handle_begin(state)` - called every time a new state
      is needed with an empty buffer. Typically called for do/end
      blocks, case expressions, anonymous functions, etc.

    * `handle_end(state)` - opposite of `handle_begin(state)` and
      it must return quoted expression.

      The marker is what follows exactly after `<%`. For example,
      `<% foo %>` has an empty marker, but `<%= foo %>` has `"="`
      as marker. The allowed markers so far are: 

        * `""`
        * `"="`
        * `"/"`
        * `"|"`

      Markers `"/"` and `"|"` are only for use in custom EEx engines
      and are not implemented by default. Using them without the
      implementation raises `EEx.SyntaxError`.

      If your engine does not implement all markers, please ensure that
      `handle_expr/3` falls back to `EEx.Engine.handle_expr/3` 
      to raise the proper error message.

      Read `handle_expr/3` below for more information about the markers
      implemented by default by this engine.

  `EEx.Engine` can be used directly if one desires to use the
  default implementations for the functions above.
  """

  @type state :: term

  @callback init(opts :: keyword) :: state
  @callback handle_body(state) :: Macro.t()
  @callback handle_text(state, text :: String.t()) :: state
  @callback handle_expr(state, marker :: String.t(), expr :: Macro.t()) :: state
  @callback handle_begin(state) :: state
  @callback handle_end(state) :: Macro.t()

  @doc false

    {:__block__, [], Enum.reverse(dynamic)}
  end

  @doc false
  def handle_text(state, text) do
    %{binary: binary} = state
    %{state | binary: [text | binary]}
  end

  @doc false
  def handle_expr(state, "=", ast) do
    %{binary: binary, dynamic: dynamic, vars_count: vars_count} = state
    var = Macro.var(:"arg#{vars_count}", __MODULE__)
