From 2408ee20667cc72a3934d30635e703cf00b4fcd4 Mon Sep 17 00:00:00 2001 From: sinno93 Date: Sat, 9 Jan 2021 12:02:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=BF=90=E7=AE=97=E7=AC=A6?= =?UTF-8?q?=E5=A3=B0=E6=98=8E=E6=96=87=E6=A1=A3=E9=94=99=E8=AF=AF=20(#1103?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 修复运算符声明文档错误 * infix-operator-attributes修改为infix-operator-group --- source/03_language_reference/06_Declarations.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/03_language_reference/06_Declarations.md b/source/03_language_reference/06_Declarations.md index 2b4b661f..29b7cdcb 100755 --- a/source/03_language_reference/06_Declarations.md +++ b/source/03_language_reference/06_Declarations.md @@ -1630,7 +1630,7 @@ infix operator 运算符名称: 优先级组 下面的形式声明了一个新的前缀运算符: ```swift -prefix operator 运算符名称 {} +prefix operator 运算符名称 ``` 出现在运算对象前边的前缀运算符是一元运算符,例如表达式 `!a` 中的前缀非运算符(`!`)。 @@ -1640,7 +1640,7 @@ prefix operator 运算符名称 {} 下面的形式声明了一个新的后缀运算符: ```swift -postfix operator 运算符名称 {} +postfix operator 运算符名称 ``` 紧跟在运算对象后边的后缀运算符是一元运算符,例如表达式 `a!` 中的后缀强制解包运算符(`!`)。 @@ -1669,8 +1669,7 @@ postfix operator 运算符名称 {} > #### infix-operator-declaration {#infix-operator-declaration} > -> *中缀运算符声明* → **infix** **运算符** [运算符](./02_Lexical_Structure.md#operator) **{** [中缀运算符属性](#infix-operator-attributes)可选 **}** -> +> *中缀运算符声明* → **infix** **运算符** [运算符](./02_Lexical_Structure.md#operator) **{** [中缀运算符组](#infix-operator-group)可选 **}** #### infix-operator-group {#infix-operator-group} > *中缀运算符组* → [优先级组名称](#precedence-group-name)