fix chapter 3 relative links
This commit is contained in:
@ -11,13 +11,13 @@ Swift 中的模式分为两类:一种能成功匹配任何类型的值,另
|
||||
> 模式语法
|
||||
>
|
||||
<a name="pattern"></a>
|
||||
> *模式* → [*通配符模式*](./#wildcard_pattern) [*类型标注*](03_Types.md#type-annotation)<sub>可选</sub>
|
||||
> *模式* → [*通配符模式*](#wildcard_pattern) [*类型标注*](03_Types.md#type-annotation)<sub>可选</sub>
|
||||
>
|
||||
> *模式* → [*标识符模式*](./#identifier_pattern) [*类型标注*](03_Types.md#type-annotation)<sub>可选</sub>
|
||||
> *模式* → [*标识符模式*](#identifier_pattern) [*类型标注*](03_Types.md#type-annotation)<sub>可选</sub>
|
||||
>
|
||||
> *模式* → [*值绑定模式*](#value-binding-pattern)
|
||||
>
|
||||
> *模式* → [*元组模式*](./#tuple-pattern) [*类型标注*](03_Types.md#type-annotation)<sub>可选</sub>
|
||||
> *模式* → [*元组模式*](#tuple-pattern) [*类型标注*](03_Types.md#type-annotation)<sub>可选</sub>
|
||||
>
|
||||
> *模式* → [*枚举用例模式*](#enum-case-pattern)
|
||||
>
|
||||
@ -136,7 +136,7 @@ let (a): Int = 2 // a: Int = 2
|
||||
> 枚举用例模式语法
|
||||
>
|
||||
<a name="enum-case-pattern"></a>
|
||||
> *枚举用例模式* → [*类型标识*](./03_Types.md#type-identifier)<sub>可选</sub> **.** [*枚举用例名*](./05_Declarations.md#enum-case-name) [*元组模式*](#tuple-pattern)<sub>可选</sub>
|
||||
> *枚举用例模式* → [*类型标识*](./03_Types.md#type-identifier)<sub>可选</sub> **.** [*枚举用例名*](./06_Declarations.md#enum-case-name) [*元组模式*](#tuple-pattern)<sub>可选</sub>
|
||||
>
|
||||
|
||||
<a name="optional_pattern"></a>
|
||||
@ -203,7 +203,7 @@ for case let number? in arrayOfOptinalInts {
|
||||
> *is 模式* → **is** [*类型*](./03_Types.md#type)
|
||||
>
|
||||
<a name="as-pattern"></a>
|
||||
> *as 模式* → [*模式*](./#pattern) **as** [*类型*](03_Types.md#type)
|
||||
> *as 模式* → [*模式*](#pattern) **as** [*类型*](03_Types.md#type)
|
||||
>
|
||||
|
||||
<a name="expression_pattern"></a>
|
||||
|
||||
Reference in New Issue
Block a user