---
description: 🚧 施工中
---

# expression

[Swift](../..) ⟩ [concept](../../../master/term) ⟩ expression

{% hint style="success" %}
<mark style="color:yellow;">**evaluates**</mark> to a <mark style="color:red;">**value**</mark> (may cause <mark style="color:red;">**side effects**</mark>).
{% endhint %}

{% tabs %}
{% tab title="🔸 定義" %}
{% hint style="info" %}
GRAMMAR OF AN EXPRESSION

* <mark style="color:green;">**expression**</mark> → \
  [try-operator](https://docs.swift.org/swift-book/ReferenceManual/Expressions.html#grammar_try-operator) opt [await-operator](https://docs.swift.org/swift-book/ReferenceManual/Expressions.html#grammar_await-operator) opt [prefix-expression](https://docs.swift.org/swift-book/ReferenceManual/Expressions.html#grammar_prefix-expression) [infix-expressions](https://docs.swift.org/swift-book/ReferenceManual/Expressions.html#grammar_infix-expressions) opt
* <mark style="color:green;">**expression-list**</mark> → \
  [expression](https://docs.swift.org/swift-book/ReferenceManual/Expressions.html#grammar_expression) | [expression](https://docs.swift.org/swift-book/ReferenceManual/Expressions.html#grammar_expression) `,` [expression-list](https://docs.swift.org/swift-book/ReferenceManual/Expressions.html#grammar_expression-list)
{% endhint %}
{% endtab %}

{% tab title="👥 相關" %}
* an <mark style="color:purple;">**expression**</mark> is a [](<> "mention") (hence, a [..](.. "mention")).
{% endtab %}

{% tab title="⭐️ 重點" %}
{% hint style="success" %}
<mark style="color:yellow;">**four kinds**</mark> of <mark style="color:purple;">**expressions**</mark>:  [<mark style="color:orange;">**primary**</mark>](expr/primary) / <mark style="color:yellow;">**prefix**</mark> / <mark style="color:yellow;">**infix**</mark> / <mark style="color:yellow;">**postfix**</mark>.&#x20;
{% endhint %}
{% endtab %}

{% tab title="🔴 主題" %}
* [<mark style="color:yellow;">**primary expressions**</mark>](expr/primary)
  * [closure-expression](../../type/category/basic/closure/closure-expression "mention")
* prefix expressions 🚧
* infix expressions 🚧
* postfix expressions 🚧
{% endtab %}

{% tab title="📘 手冊" %}
* [ ] [Expressions](https://docs.swift.org/swift-book/ReferenceManual/Expressions.html)
{% endtab %}

{% tab title="🚧 " %}
{% hint style="warning" %}
what is a **value**? **side effect**?
{% endhint %}
{% endtab %}
{% endtabs %}
