@@ -553,7 +553,7 @@ make the same change here also.
553
553
> * 语句* → * 声明* ** ` ; ` ** 可选 \
554
554
> * 语句* → * 循环语句* ** ` ; ` ** 可选 \
555
555
> * 语句* → * 分支语句* ** ` ; ` ** 可选 \
556
- > * 语句* → * 带标签的语句 * ** ` ; ` ** 可选 \
556
+ > * 语句* → * 标签语句 * ** ` ; ` ** 可选 \
557
557
> * 语句* → * 控制转移语句* ** ` ; ` ** 可选 \
558
558
> * 语句* → * 延迟语句* ** ` ; ` ** 可选 \
559
559
> * 语句* → * 执行语句* ** ` ; ` ** 可选 \
@@ -620,120 +620,119 @@ make the same change here also.
620
620
> * switch-elseif 指令子句* → * elseif 指令* * 编译条件* * switch-case 集* 可选 \
621
621
> * switch-else 指令子句* → * else 指令* * switch-case 集* 可选
622
622
623
- > Grammar of a labeled statement:
623
+ > 标签语句的语法:
624
624
>
625
- > * labeled-statement * → * statement-label * * loop-statement * \
626
- > * labeled-statement * → * statement-label * * if-statement * \
627
- > * labeled-statement * → * statement-label * * switch-statement * \
628
- > * labeled-statement * → * statement-label * * do-statement *
625
+ > * 标签语句 * → * 语句标签 * * 循环语句 * \
626
+ > * 标签语句 * → * 语句标签 * * if 语句 * \
627
+ > * 标签语句 * → * 语句标签 * * switch 语句 * \
628
+ > * 标签语句 * → * 语句标签 * * do 语句 *
629
629
>
630
- > * statement-label * → * label-name * ** ` : ` ** \
631
- > * label-name * → * identifier *
630
+ > * 语句标签 * → * 标签名称 * ** ` : ` ** \
631
+ > * 标签名称 * → * 标识符 *
632
632
633
- > Grammar of a control transfer statement:
633
+ > 控制转移语句的语法:
634
634
>
635
- > * control-transfer-statement * → * break-statement * \
636
- > * control-transfer-statement * → * continue-statement * \
637
- > * control-transfer-statement * → * fallthrough-statement * \
638
- > * control-transfer-statement * → * return-statement * \
639
- > * control-transfer-statement * → * throw-statement *
635
+ > * 控制转移语句 * → * break 语句 * \
636
+ > * 控制转移语句 * → * continue 语句 * \
637
+ > * 控制转移语句 * → * fallthrough 语句 * \
638
+ > * 控制转移语句 * → * return 语句 * \
639
+ > * 控制转移语句 * → * throw 语句 *
640
640
641
- > Grammar of a break statement:
641
+ > break 语句的语法:
642
642
>
643
- > * break-statement * → ** ` break ` ** * label-name * 可选
643
+ > * break 语句 * → ** ` break ` ** * 标签名称 * 可选
644
644
645
- > Grammar of a continue statement:
645
+ > continue 语句的语法:
646
646
>
647
- > * continue-statement * → ** ` continue ` ** * label-name * 可选
647
+ > * continue 语句 * → ** ` continue ` ** * 标签名称 * 可选
648
648
649
- > Grammar of a fallthrough statement:
649
+ > fallthrough 语句的语法:
650
650
>
651
- > * fallthrough-statement * → ** ` fallthrough ` **
651
+ > * fallthrough 语句 * → ** ` fallthrough ` **
652
652
653
- > Grammar of a return statement:
653
+ > return 语句的语法:
654
654
>
655
- > * return-statement * → ** ` return ` ** * expression * 可选
655
+ > * return 语句 * → ** ` return ` ** * 表达式 * 可选
656
656
657
- > Grammar of a throw statement:
657
+ > throw 语句的语法:
658
658
>
659
- > * throw-statement * → ** ` throw ` ** * expression *
659
+ > * throw 语句 * → ** ` throw ` ** * 表达式 *
660
660
661
- > Grammar of a defer statement:
661
+ > defer 语句的语法:
662
662
>
663
- > * defer-statement * → ** ` defer ` ** * code-block *
663
+ > * defer 语句 * → ** ` defer ` ** * 代码块 *
664
664
665
- > Grammar of a do statement:
665
+ > do 语句的语法:
666
666
>
667
- > * do-statement * → ** ` do ` ** * throws-clause * 可选 * code-block * * catch-clauses * 可选 \
668
- > * catch-clauses * → * catch-clause * * catch-clauses * 可选 \
669
- > * catch-clause * → ** ` catch ` ** * catch-pattern-list * 可选 * code-block * \
670
- > * catch-pattern-list * → * catch-pattern * | * catch-pattern * ** ` , ` ** * catch-pattern-list * \
671
- > * catch-pattern * → * pattern * * where-clause * 可选
667
+ > * do 语句 * → ** ` do ` ** * throws 子句 * 可选 * 代码块 * * catch 子句 * 可选 \
668
+ > * catch 子句集 * → * catch 子句 * * catch 子句 * 可选 \
669
+ > * catch 子句 * → ** ` catch ` ** * catch 模式列表 * 可选 * 代码块 * \
670
+ > * catch 模式列表 * → * catch 模式 * | * catch 模式 * ** ` , ` ** * catch 模式列表 * \
671
+ > * catch 模式 * → * 模式 * * where 子句 * 可选
672
672
673
- > Grammar of a compiler control statement:
673
+ > 编译器控制语句的语法:
674
674
>
675
- > * compiler-control-statement * → * conditional-compilation-block * \
676
- > * compiler-control-statement * → * line-control-statement * \
677
- > * compiler-control-statement * → * diagnostic-statement *
675
+ > * 编译器控制语句 * → * 条件编译块 * \
676
+ > * 编译器控制语句 * → * 行控制语句 * \
677
+ > * 编译器控制语句 * → * 诊断语句 *
678
678
679
- > Grammar of a conditional compilation block:
679
+ > 条件编译块的语法:
680
680
>
681
- > * conditional-compilation-block* → * if-directive-clause* * elseif-directive-clauses* 可选 * else-directive-clause* 可选 * endif-directive*
681
+ > * 条件编译块* → * if 指令子句* * elseif 指令子句集* 可选 * else 指令子句* 可选 * endif 指令* \
682
+ > * if 指令子句* → * if 指令* * 编译条件* * 语句集合* 可选 \
683
+ > * elseif 指令子句* → * elseif 指令子句* * elseif 指令子句集* 可选 \
684
+ > * elseif 指令子句* → * elseif 指令* * 编译条件* * 语句集* 可选 \
685
+ > * else 指令子句* → * else 指令* * 语句集* 可选 \
686
+ > * if 指令* → ** ` #if ` ** \
687
+ > * elseif 指令* → ** ` #elseif ` ** \
688
+ > * else 指令* → ** ` #else ` ** \
689
+ > * endif 指令* → ** ` #endif ` **
682
690
>
683
- > * if-directive-clause* → * if-directive* * compilation-condition* * statements* 可选 \
684
- > * elseif-directive-clauses* → * elseif-directive-clause* * elseif-directive-clauses* 可选 \
685
- > * elseif-directive-clause* → * elseif-directive* * compilation-condition* * statements* 可选 \
686
- > * else-directive-clause* → * else-directive* * statements* 可选 \
687
- > * if-directive* → ** ` #if ` ** \
688
- > * elseif-directive* → ** ` #elseif ` ** \
689
- > * else-directive* → ** ` #else ` ** \
690
- > * endif-directive* → ** ` #endif ` **
691
+ > * 编译条件* → * 平台条件* \
692
+ > * 编译条件* → * 标识符* \
693
+ > * 编译条件* → * 布尔字面量* \
694
+ > * 编译条件* → ** ` ( ` ** * 编译条件* ** ` ) ` ** \
695
+ > * 编译条件* → ** ` ! ` ** * 编译条件* \
696
+ > * 编译条件* → * 编译条件* ** ` && ` ** * 编译条件* \
697
+ > * 编译条件* → * 编译条件* ** ` || ` ** * 编译条件*
691
698
>
692
- > * compilation-condition* → * platform-condition* \
693
- > * compilation-condition* → * identifier* \
694
- > * compilation-condition* → * boolean-literal* \
695
- > * compilation-condition* → ** ` ( ` ** * compilation-condition* ** ` ) ` ** \
696
- > * compilation-condition* → ** ` ! ` ** * compilation-condition* \
697
- > * compilation-condition* → * compilation-condition* ** ` && ` ** * compilation-condition* \
698
- > * compilation-condition* → * compilation-condition* ** ` || ` ** * compilation-condition*
699
+ > * 平台条件* → ** ` os ` ** ** ` ( ` ** * 操作系统* ** ` ) ` ** \
700
+ > * 平台条件* → ** ` arch ` ** ** ` ( ` ** * 体系结构* ** ` ) ` ** \
701
+ > * 平台条件* → ** ` swift ` ** ** ` ( ` ** ** ` >= ` ** * swift 版本* ** ` ) ` ** | ** ` swift ` ** ** ` ( ` ** ** ` < ` ** * swift 版本* ** ` ) ` ** \
702
+ > * 平台条件* → ** ` compiler ` ** ** ` ( ` ** ** ` >= ` ** * swift 版本* ** ` ) ` ** | ** ` compiler ` ** ** ` ( ` ** ** ` < ` ** * swift 版本* ** ` ) ` ** \
703
+ > * 平台条件* → ** ` canImport ` ** ** ` ( ` ** * 导入路径* ** ` ) ` ** \
704
+ > * 平台条件* → ** ` targetEnvironment ` ** ** ` ( ` ** * 环境* ** ` ) ` **
699
705
>
700
- > * platform-condition* → ** ` os ` ** ** ` ( ` ** * operating-system* ** ` ) ` ** \
701
- > * platform-condition* → ** ` arch ` ** ** ` ( ` ** * architecture* ** ` ) ` ** \
702
- > * platform-condition* → ** ` swift ` ** ** ` ( ` ** ** ` >= ` ** * swift-version* ** ` ) ` ** | ** ` swift ` ** ** ` ( ` ** ** ` < ` ** * swift-version* ** ` ) ` ** \
703
- > * platform-condition* → ** ` compiler ` ** ** ` ( ` ** ** ` >= ` ** * swift-version* ** ` ) ` ** | ** ` compiler ` ** ** ` ( ` ** ** ` < ` ** * swift-version* ** ` ) ` ** \
704
- > * platform-condition* → ** ` canImport ` ** ** ` ( ` ** * import-path* ** ` ) ` ** \
705
- > * platform-condition* → ** ` targetEnvironment ` ** ** ` ( ` ** * environment* ** ` ) ` **
706
- >
707
- > * operating-system* → ** ` macOS ` ** | ** ` iOS ` ** | ** ` watchOS ` ** | ** ` tvOS ` ** | ** ` visionOS ` ** | ** ` Linux ` ** | ** ` Windows ` ** \
708
- > * architecture* → ** ` i386 ` ** | ** ` x86_64 ` ** | ** ` arm ` ** | ** ` arm64 ` ** \
709
- > * swift-version* → * decimal-digits* * swift-version-continuation* 可选 \
710
- > * swift-version-continuation* → ** ` . ` ** * decimal-digits* * swift-version-continuation* 可选 \
711
- > * environment* → ** ` simulator ` ** | ** ` macCatalyst ` **
706
+ > * 操作系统* → ** ` macOS ` ** | ** ` iOS ` ** | ** ` watchOS ` ** | ** ` tvOS ` ** | ** ` visionOS ` ** | ** ` Linux ` ** | ** ` Windows ` ** \
707
+ > * 体系结构* → ** ` i386 ` ** | ** ` x86_64 ` ** | ** ` arm ` ** | ** ` arm64 ` ** \
708
+ > * swift 版本* → * 十进制数字* * swift 版本延续* 可选 \
709
+ > * swift 版本延续* → ** ` . ` ** * 十进制数字* * swift 版本延续* 可选 \
710
+ > * 环境* → ** ` simulator ` ** | ** ` macCatalyst ` **
712
711
713
- > Grammar of a line control statement:
712
+ > 行控制语句的语法:
714
713
>
715
- > * line-control-statement * → ** ` #sourceLocation ` ** ** ` ( ` ** ** ` file: ` ** * file-path * ** ` , ` ** ** ` line: ` ** * line-number * ** ` ) ` ** \
716
- > * line-control-statement * → ** ` #sourceLocation ` ** ** ` ( ` ** ** ` ) ` ** \
717
- > * line-number * → A decimal integer greater than zero \
718
- > * file-path * → * static-string-literal *
714
+ > * 行控制语句 * → ** ` #sourceLocation ` ** ** ` ( ` ** ** ` file: ` ** * 文件路径 * ** ` , ` ** ** ` line: ` ** * 行号 * ** ` ) ` ** \
715
+ > * 行控制语句 * → ** ` #sourceLocation ` ** ** ` ( ` ** ** ` ) ` ** \
716
+ > * 行号 * → 大于零的十进制整数 \
717
+ > * 文件路径 * → * 静态字符串字面量 *
719
718
720
- > Grammar of an availability condition:
719
+ > 可用性条件的语法:
721
720
>
722
- > * availability-condition * → ** ` #available ` ** ** ` ( ` ** * availability-arguments * ** ` ) ` ** \
723
- > * availability-condition * → ** ` #unavailable ` ** ** ` ( ` ** * availability-arguments * ** ` ) ` ** \
724
- > * availability-arguments * → * availability-argument * | * availability-argument * ** ` , ` ** * availability-arguments * \
725
- > * availability-argument * → * platform-name * * platform-version * \
726
- > * availability-argument * → ** ` * ` **
721
+ > * 可用性条件 * → ** ` #available ` ** ** ` ( ` ** * 可用性参数 * ** ` ) ` ** \
722
+ > * 可用性条件 * → ** ` #unavailable ` ** ** ` ( ` ** * 可用性参数 * ** ` ) ` ** \
723
+ > * 可用性参数 * → * 可用性参数 * | * 可用性参数 * ** ` , ` ** * 可用性参数 * \
724
+ > * 可用性参数 * → * 平台名称 * * 平台版本 * \
725
+ > * 可用性参数 * → ** ` * ` **
727
726
>
728
- > * platform-name * → ** ` iOS ` ** | ** ` iOSApplicationExtension ` ** \
729
- > * platform-name * → ** ` macOS ` ** | ** ` macOSApplicationExtension ` ** \
730
- > * platform-name * → ** ` macCatalyst ` ** | ** ` macCatalystApplicationExtension ` ** \
731
- > * platform-name * → ** ` watchOS ` ** | ** ` watchOSApplicationExtension ` ** \
732
- > * platform-name * → ** ` tvOS ` ** | ** ` tvOSApplicationExtension ` ** \
733
- > * platform-name * → ** ` visionOS ` ** | ** ` visionOSApplicationExtension ` ** \
734
- > * platform-version * → * decimal-digits * \
735
- > * platform-version * → * decimal-digits * ** ` . ` ** * decimal-digits * \
736
- > * platform-version * → * decimal-digits * ** ` . ` ** * decimal-digits * ** ` . ` ** * decimal-digits *
727
+ > * 平台名称 * → ** ` iOS ` ** | ** ` iOSApplicationExtension ` ** \
728
+ > * 平台名称 * → ** ` macOS ` ** | ** ` macOSApplicationExtension ` ** \
729
+ > * 平台名称 * → ** ` macCatalyst ` ** | ** ` macCatalystApplicationExtension ` ** \
730
+ > * 平台名称 * → ** ` watchOS ` ** | ** ` watchOSApplicationExtension ` ** \
731
+ > * 平台名称 * → ** ` tvOS ` ** | ** ` tvOSApplicationExtension ` ** \
732
+ > * 平台名称 * → ** ` visionOS ` ** | ** ` visionOSApplicationExtension ` ** \
733
+ > * 平台版本 * → * 十进制数字 * \
734
+ > * 平台版本 * → * 十进制数字 * ** ` . ` ** * 十进制数字 * \
735
+ > * 平台版本 * → * 十进制数字 * ** ` . ` ** * 十进制数字 * ** ` . ` ** * 十进制数字 *
737
736
738
737
## Declarations
739
738
0 commit comments