# compiler control statement

[Swift](https://lochiwei.gitbook.io/ios/swift) ⟩ [concept](https://lochiwei.gitbook.io/ios/master/term) ⟩ [statement](https://lochiwei.gitbook.io/ios/swift/statement) ⟩ compiler

{% hint style="success" %}
allow the program to&#x20;

* <mark style="color:yellow;">**change**</mark> aspects of the <mark style="color:yellow;">**compiler’s behavior**</mark>&#x20;
* and include a <mark style="color:yellow;">**conditional compilation**</mark> block&#x20;
* and a <mark style="color:yellow;">**line control**</mark> statement.
  {% endhint %}

{% tabs %}
{% tab title="🔴 主題" %}

* conditional compilation block (#if ... #endif) 🚧
* line control statement (#sourceLocation) 🚧
* compile-time diagnostic statement (#error, #warning) 🚧
  {% endtab %}

{% tab title="⭐️ 重點" %}
{% hint style="info" %}
GRAMMAR OF A COMPILER CONTROL STATEMENT

* compiler-control-statement → [conditional-compilation-block](https://docs.swift.org/swift-book/ReferenceManual/Statements.html#grammar_conditional-compilation-block)
* compiler-control-statement → [line-control-statement](https://docs.swift.org/swift-book/ReferenceManual/Statements.html#grammar_line-control-statement)
* compiler-control-statement → [diagnostic-statement](https://docs.swift.org/swift-book/ReferenceManual/Statements.html#grammar_diagnostic-statement)
  {% endhint %}
  {% endtab %}

{% tab title="📘 手冊" %}

* [ ] [Statements](https://docs.swift.org/swift-book/ReferenceManual/Statements.html)
  {% endtab %}
  {% endtabs %}
