From 1f351fad779bf7d79c001636463c405f6402d43c Mon Sep 17 00:00:00 2001 From: stanzhai Date: Sat, 14 Jun 2014 13:47:00 +0800 Subject: [PATCH] correct attributes grammar --- source/chapter3/06_Attributes.md | 22 ++++++++++---------- source/chapter3/09_Summary_of_the_Grammar.md | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/source/chapter3/06_Attributes.md b/source/chapter3/06_Attributes.md index bf661f30..7ff947d0 100644 --- a/source/chapter3/06_Attributes.md +++ b/source/chapter3/06_Attributes.md @@ -114,14 +114,14 @@ Interface Builder特性是Interface Builder用来与Xcode同步的声明特性 该特性用于修饰函数或方法的类型,表明该函数或方法不会返回到它的调用者中去。你也可以用它标记函数或方法的声明,表示函数或方法的相应类型,`T`,是`@noreturn T`。 -> 特性的语法 -> attribute -> @ [attribute-name]() [attribute-argument-clause]()opt -> attribute-name -> [identifier]() -> attribute-argument-clause -> ( [balanced-tokens]()opt ) -> attributes -> [attribute]() [attributes]()opt -> balanced-tokens -> [balanced-token]() [balanced-tokens]()opt -> balanced-token -> ( [balanced-tokens]()opt ) -> balanced-token -> [ [balanced-tokens]()opt ] -> balanced-token -> { [balanced-tokens]()opt } -> balanced-token -> 任意标识符,关键字,字面量,或运算符 -> balanced-token -> 任意标点符号,除了(, ), [, ], {, 或 } +> 特性语法 +> *特色* → **@** [*特性名*](..\chapter3\06_Attributes.html#attribute_name) [*特性参数子句*](..\chapter3\06_Attributes.html#attribute_argument_clause) _可选_ +> *特性名* → [*标识符*](LexicalStructure.html#identifier) +> *特性参数子句* → **(** [*平衡令牌列表*](..\chapter3\06_Attributes.html#balanced_tokens) _可选_ **)** +> *特性(Attributes)列表* → [*特色*](..\chapter3\06_Attributes.html#attribute) [*特性(Attributes)列表*](..\chapter3\06_Attributes.html#attributes) _可选_ +> *平衡令牌列表* → [*平衡令牌*](..\chapter3\06_Attributes.html#balanced_token) [*平衡令牌列表*](..\chapter3\06_Attributes.html#balanced_tokens) _可选_ +> *平衡令牌* → **(** [*平衡令牌列表*](..\chapter3\06_Attributes.html#balanced_tokens) _可选_ **)** +> *平衡令牌* → **[** [*平衡令牌列表*](..\chapter3\06_Attributes.html#balanced_tokens) _可选_ **]** +> *平衡令牌* → **{** [*平衡令牌列表*](..\chapter3\06_Attributes.html#balanced_tokens) _可选_ **}** +> *平衡令牌* → **任意标识符, 关键字, 字面量或运算符** +> *平衡令牌* → **任意标点除了(, ), [, ], {, 或 }** diff --git a/source/chapter3/09_Summary_of_the_Grammar.md b/source/chapter3/09_Summary_of_the_Grammar.md index 958eff6a..37a2f41a 100644 --- a/source/chapter3/09_Summary_of_the_Grammar.md +++ b/source/chapter3/09_Summary_of_the_Grammar.md @@ -417,8 +417,8 @@ _________________ > *平衡令牌* → **(** [*平衡令牌列表*](..\chapter3\06_Attributes.html#balanced_tokens) _可选_ **)** > *平衡令牌* → **[** [*平衡令牌列表*](..\chapter3\06_Attributes.html#balanced_tokens) _可选_ **]** > *平衡令牌* → **{** [*平衡令牌列表*](..\chapter3\06_Attributes.html#balanced_tokens) _可选_ **}** -> *平衡令牌* → 任意标识符, 关键字, 字面量或运算符 -> *平衡令牌* → 任意除了(-, )=, [-, ]-, {- 或 }- +> *平衡令牌* → **任意标识符, 关键字, 字面量或运算符** +> *平衡令牌* → **任意标点除了(, ), [, ], {, 或 }** ## 表达式