       { :halt, value } ->
         send receiver, {:halt, value}
       { index, line } ->
-        lex(index, String.codepoints(line), receiver, options)
+        lex(index, line, receiver, options)
         lex_into(receiver, options)
     end
   end

  end

  defp emit_token!(token, receiver) do
    case token do
      {:content, value} ->
        send receiver, {:content, Enum.join(value, "")}
      _ -> send receiver, token
    end
  end

end

    end
  end

  defp lex(index, @double_quote <> tail, receiver, current_token, separator) do
    emit_token!(current_token, receiver)
    lex(index, tail, receiver, {:double_quote, @double_quote}, separator)
  end

  defp lex(index, << head :: utf8 >> <> tail, receiver, current_token, separator) do
    case << head :: utf8 >> do
      ^separator ->
        emit_token!(current_token, receiver)
        lex(index, tail, receiver, {:separator, separator}, separator)

      _ -> case current_token do
             {:content, value} ->
              lex(index, tail, receiver, {:content, value <> << head :: utf8 >>}, separator)
             _ ->
               emit_token!(current_token, receiver)
               lex(index, tail, receiver, {:content, << head :: utf8 >>}, separator)
           end
    end
  end

  defp lex(index, "", receiver, current_token, _) do
    emit_token!(current_token, receiver)
    emit_token!({:end, index}, receiver)
  end
