# code generation

[JS](..) ⟩ [concepts](../concept) ⟩ [compiler]() ⟩ code generation

{% hint style="success" %}
<mark style="color:yellow;">**3rd stage**</mark> of compilation:&#x20;

* turns <mark style="color:orange;">**AST**</mark> (<mark style="color:yellow;">**abstract syntax tree**</mark>) -> executable code.
{% endhint %}

{% tabs %}
{% tab title="🗺️ 圖表" %}
<img src="https://2527454625-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfvEFZnSBhKT6fJmus0%2Fuploads%2FbOhtr4sbZOP3NTLHGCvF%2Ffile.drawing.svg?alt=media&#x26;token=bddd2d95-b3bd-4452-b75c-522a37703511" alt="3 steps of compilation" class="gitbook-drawing">
{% endtab %}

{% tab title="📗 參考" %}
* [ ] [ydkjs-scope-and-closures-v.2](../../master/ref/book/you-dont-know-js-series-v.2/ydkjs-scope-and-closures-v.2 "mention") ⟩ [Ch. 1: What's the Scope?](https://github.com/getify/You-Dont-Know-JS/blob/2nd-ed/scope-closures/ch1.md#chapter-1-whats-the-scope)
{% endtab %}
{% endtabs %}
