Skip to content

Commit 4a56a37

Browse files
committed
translate to Grammar of a switch statement
1 parent e3a5cae commit 4a56a37

File tree

1 file changed

+70
-70
lines changed

1 file changed

+70
-70
lines changed

swift-6-beta.docc/ReferenceManual/SummaryOfTheGrammar.md

Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ make the same change here also.
493493
> *后缀表达式**基本表达式* \
494494
> *后缀表达式**后缀表达式* *后缀运算符* \
495495
> *后缀表达式**函数调用表达式* \
496-
> *后缀表达式**初始化表达式* \
496+
> *后缀表达式**构造器表达式* \
497497
> *后缀表达式**显式成员表达式* \
498498
> *后缀表达式**后缀 self 表达式* \
499499
> *后缀表达式**下标表达式* \
@@ -514,111 +514,111 @@ make the same change here also.
514514
> *带标签的尾随闭包**带标签的尾随闭包* *带标签的尾随闭包* 可选 \
515515
> *带标签的尾随闭包**标识符* **`:`** *闭包表达式*
516516
517-
> Grammar of an initializer expression:
517+
> 构造器表达式的语法:
518518
>
519-
> *initializer-expression**postfix-expression* **`.`** **`init`** \
520-
> *initializer-expression**postfix-expression* **`.`** **`init`** **`(`** *argument-names* **`)`**
519+
> *构造器表达式**后缀表达式* **`.`** **`init`** \
520+
> *构造器表达式**后缀表达式* **`.`** **`init`** **`(`** *参数名称* **`)`**
521521
522-
> Grammar of an explicit member expression:
522+
> 显式成员表达式的语法:
523523
>
524-
> *explicit-member-expression**postfix-expression* **`.`** *decimal-digits* \
525-
> *explicit-member-expression**postfix-expression* **`.`** *identifier* *generic-argument-clause*可选 \
526-
> *explicit-member-expression**postfix-expression* **`.`** *identifier* **`(`** *argument-names* **`)`** \
527-
> *explicit-member-expression**postfix-expression* *conditional-compilation-block*
524+
> *显式成员表达式**后缀表达式* **`.`** *十进制数字* \
525+
> *显式成员表达式**后缀表达式* **`.`** *标识符* *泛型参数子句* 可选 \
526+
> *显式成员表达式**后缀表达式* **`.`** *标识符* **`(`** *参数名称* **`)`** \
527+
> *显式成员表达式**后缀表达式* *条件编译块*
528528
>
529-
> *argument-names**argument-name* *argument-names*可选 \
530-
> *argument-name**identifier* **`:`**
529+
> *参数名称**参数名称* *参数名称* 可选 \
530+
> *参数名称**标识符* **`:`**
531531
532-
> Grammar of a postfix self expression:
532+
> 后缀 self表达式的语法:
533533
>
534-
> *postfix-self-expression**postfix-expression* **`.`** **`self`**
534+
> *后缀 self 表达式**后缀表达式* **`.`** **`self`**
535535
536-
> Grammar of a subscript expression:
536+
> 下标表达式的语法:
537537
>
538-
> *subscript-expression**postfix-expression* **`[`** *function-call-argument-list* **`]`**
538+
> *下标表达式**后缀表达式* **`[`** *函数调用参数列表* **`]`**
539539
540-
> Grammar of a forced-value expression:
540+
> 强制取值表达式的语法:
541541
>
542-
> *forced-value-expression**postfix-expression* **`!`**
542+
> *强制取值表达式**后缀表达式* **`!`**
543543
544-
> Grammar of an optional-chaining expression:
544+
> 可选链式表达式的语法:
545545
>
546-
> *optional-chaining-expression**postfix-expression* **`?`**
546+
> *可选链式表达式**后缀表达式* **`?`**
547547
548-
## Statements
548+
## 语句
549549

550-
> Grammar of a statement:
550+
> 语句的语法:
551551
>
552-
> *statement**expression* **`;`**可选 \
553-
> *statement**declaration* **`;`**可选 \
554-
> *statement**loop-statement* **`;`**可选 \
555-
> *statement**branch-statement* **`;`**可选 \
556-
> *statement**labeled-statement* **`;`**可选 \
557-
> *statement**control-transfer-statement* **`;`**可选 \
558-
> *statement**defer-statement* **`;`**可选 \
559-
> *statement**do-statement* **`;`**可选 \
560-
> *statement**compiler-control-statement* \
561-
> *statements**statement* *statements*可选
552+
> *语句**表达式* **`;`** 可选 \
553+
> *语句**声明* **`;`** 可选 \
554+
> *语句**循环语句* **`;`** 可选 \
555+
> *语句**分支语句* **`;`** 可选 \
556+
> *语句**带标签的语句* **`;`** 可选 \
557+
> *语句**控制转移语句* **`;`** 可选 \
558+
> *语句**延迟语句* **`;`** 可选 \
559+
> *语句**执行语句* **`;`** 可选 \
560+
> *语句**编译器控制语句* \
561+
> *语句集合**语句* *语句集合* 可选
562562
563-
> Grammar of a loop statement:
563+
> 循环语句的语法:
564564
>
565-
> *loop-statement**for-in-statement* \
566-
> *loop-statement**while-statement* \
567-
> *loop-statement**repeat-while-statement*
565+
> *循环语句**for-in 语句* \
566+
> *循环语句**while 语句* \
567+
> *循环语句**repeat-while 语句*
568568
569-
> Grammar of a for-in statement:
569+
> for-in 语句的语法:
570570
>
571-
> *for-in-statement***`for`** **`case`**可选 *pattern* **`in`** *expression* *where-clause*可选 *code-block*
571+
> *for-in 语句***`for`** **`case`** 可选 *模式* **`in`** *表达式* *where 子句* 可选 *代码块*
572572
573-
> Grammar of a while statement:
573+
> while 语句的语法:
574574
>
575-
> *while-statement***`while`** *condition-list* *code-block*
575+
> *while 语句***`while`** *条件列表* *代码块*
576576
>
577-
> *condition-list**condition* | *condition* **`,`** *condition-list* \
578-
> *condition**expression* | *availability-condition* | *case-condition* | *optional-binding-condition*
577+
> *条件列表**条件* | *条件* **`,`** *条件列表* \
578+
> *条件**表达式* | *可用性条件* | *case条件* | *可选绑定条件*
579579
>
580-
> *case-condition***`case`** *pattern* *initializer* \
581-
> *optional-binding-condition***`let`** *pattern* *initializer*可选 | **`var`** *pattern* *initializer*可选
580+
> *case条件***`case`** *模式* *初始化器* \
581+
> *可选绑定条件***`let`** *模式* *初始化器* 可选 | **`var`** *模式* *初始化器* 可选
582582
583-
> Grammar of a repeat-while statement:
583+
> repeat-while 语句的语法:
584584
>
585-
> *repeat-while-statement***`repeat`** *code-block* **`while`** *expression*
585+
> *repeat-while 语句***`repeat`** *代码块* **`while`** *表达式*
586586
587-
> Grammar of a branch statement:
587+
> 分支语句的语法:
588588
>
589-
> *branch-statement**if-statement* \
590-
> *branch-statement**guard-statement* \
591-
> *branch-statement**switch-statement*
589+
> *分支语句**if 语句* \
590+
> *分支语句**guard 语句* \
591+
> *分支语句**switch 语句*
592592
593-
> Grammar of an if statement:
593+
> if 语句的语法:
594594
>
595-
> *if-statement***`if`** *condition-list* *code-block* *else-clause*可选 \
596-
> *else-clause***`else`** *code-block* | **`else`** *if-statement*
595+
> *if 语句***`if`** *条件列表* *代码块* *else 子句* 可选 \
596+
> *else 子句***`else`** *代码块* | **`else`** *if 语句*
597597
598-
> Grammar of a guard statement:
598+
> guard 语句的语法:
599599
>
600-
> *guard-statement***`guard`** *condition-list* **`else`** *code-block*
600+
> *guard 语句***`guard`** *条件列表* **`else`** *代码块*
601601
602-
> Grammar of a switch statement:
602+
> switch 语句的语法:
603603
>
604-
> *switch-statement***`switch`** *expression* **`{`** *switch-cases*可选 **`}`** \
605-
> *switch-cases**switch-case* *switch-cases*可选 \
606-
> *switch-case**case-label* *statements* \
607-
> *switch-case**default-label* *statements* \
608-
> *switch-case**conditional-switch-case*
604+
> *switch 语句***`switch`** *表达式* **`{`** *switch 语句* 可选 **`}`** \
605+
> *switch 语句**switch 语句* *switch 语句* 可选 \
606+
> *switch 语句**case 标签* *语句集合* \
607+
> *switch 语句**default 标签* *语句集合* \
608+
> *switch 语句**条件 switch 语句*
609609
>
610-
> *case-label**attributes*可选 **`case`** *case-item-list* **`:`** \
611-
> *case-item-list**pattern* *where-clause*可选 | *pattern* *where-clause*可选 **`,`** *case-item-list* \
612-
> *default-label**attributes*可选 **`default`** **`:`**
610+
> *case 标签**属性* 可选 **`case`** *case 项列表* **`:`** \
611+
> *case 项列表**模式* *where 子句* 可选 | *模式* *where 子句* 可选 **`,`** *case 项列表* \
612+
> *default 标签**属性* 可选 **`default`** **`:`**
613613
>
614-
> *where-clause***`where`** *where-expression* \
615-
> *where-expression**expression*
614+
> *where 子句***`where`** *where 表达式* \
615+
> *where 表达式**表达式*
616616
>
617-
> *conditional-switch-case**switch-if-directive-clause* *switch-elseif-directive-clauses*可选 *switch-else-directive-clause*可选 *endif-directive* \
618-
> *switch-if-directive-clause**if-directive* *compilation-condition* *switch-cases*可选 \
619-
> *switch-elseif-directive-clauses**elseif-directive-clause* *switch-elseif-directive-clauses*可选 \
620-
> *switch-elseif-directive-clause**elseif-directive* *compilation-condition* *switch-cases*可选 \
621-
> *switch-else-directive-clause**else-directive* *switch-cases*可选
617+
> *条件 switch 语句**switch-if 指令子句* *switch-elseif 指令子句集* 可选 *switch-else 指令子句* 可选 *endif 指令* \
618+
> *switch-if 指令子句**if 指令* *编译条件* *switch-case 集* 可选 \
619+
> *switch-elseif 指令子句**elseif 指令子句* *switch-elseif 指令子句集* 可选 \
620+
> *switch-elseif 指令子句**elseif 指令* *编译条件* *switch-case 集* 可选 \
621+
> *switch-else 指令子句**else 指令* *switch-case 集* 可选
622622
623623
> Grammar of a labeled statement:
624624
>

0 commit comments

Comments
 (0)