Skip to content

Commit 9986c03

Browse files
committed
Update 10_Summary_of_the_Grammar.md
1 parent 628c86d commit 9986c03

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/chapter3/10_Summary_of_the_Grammar.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,11 @@ default标签 → **default** :
163163

164164
###GRAMMAR OF A LABELED STATEMENT
165165

166-
‌labeled-statement → statement-label loop-statement | statement-label switch-statement
167-
168-
statement-label → label-name:
169-
170-
label-name → identifier
166+
‌ labeled-statement → statement-label loop-statement | statement-label switch-statement
167+
168+
statement-label → label-name:
169+
170+
label-name → identifier
171171

172172
###标记语句语法
173173
标记语句 → 语句标签 循环语句 | 语句标签 switch语句
@@ -376,6 +376,7 @@ return语句 → **return** 表达式 可选
376376
###GRAMMAR OF A CODE BLOCK
377377

378378
‌ code-block → {statements opt}
379+
379380
###代码块语法
380381
代码块 → { 多条语句 可选 }
381382

@@ -407,6 +408,7 @@ return语句 → **return** 表达式 可选
407408
‌ pattern-initializer → pattern initializer opt
408409

409410
‌ initializer → =expression
411+
410412
###常数声明语法
411413
常量声明 → 属性列表 可选 声明描述符列表 可选 **let** 模式构造器列表
412414

@@ -424,7 +426,7 @@ return语句 → **return** 表达式 可选
424426

425427
‌ variable-declaration → variable-declaration-head variable-name type-annotation getter-setter-block
426428

427-
variable-declaration → variable-declaration-head variable-name type-annotation getter-setter-keyword-block
429+
variable-declaration → variable-declaration-head variable-name type-annotation getter-setter-keyword-block
428430

429431
‌ variable-declaration → variable-declaration-head variable-name type-annotation initializer opt willSet-didSet-block
430432

@@ -1740,8 +1742,8 @@ superclass-initializer-expression → super.init
17401742
###GRAMMAR OF A PROTOCOL COMPOSITION TYPE
17411743

17421744
‌ protocol-composition-type → protocol <protocol-identifier-list opt>
1743-
1744-
protocol-identifier-list → protocol-identifier protocol-identifier,protocol-identifier-list
1745+
1746+
protocol-identifier-list → protocol-identifier protocol-identifier,protocol-identifier-list
17451747

17461748
‌ protocol-identifier → type-identifier
17471749

0 commit comments

Comments
 (0)