 so you can even move these blocks of code anywhere in the same file.</p>
<h2 id='per-file-code-generation' class='heading'>Per file code generation</h2>

<p>Sourcery supports generating code in a separate file per type, you just need to put <code>file</code> annotation in a template, e.g.</p>
<pre class="highlight swift"><code><span class="p">{</span><span class="o">%</span> <span class="k">for</span> <span class="n">type</span> <span class="k">in</span> <span class="n">types</span><span class="o">.</span>