ObjC 方法声明之前的 + 和 - 符号是否有正式名称?
Is there an official name for the + and - symbols before ObjC method declarations?
方法声明开头的 +
或 -
符号(分别用于 class 和实例方法)是否有名称?
我指的是 "method descriptor" 或 "method type indicator" 或类似的名称。
我同意; I've never seen a name for these tokens in any documentation, and the relevant part of Clang's parser
Decl *Parser::ParseObjCMethodPrototype(tok::ObjCKeywordKind MethodImplKind,
bool MethodDefinition) {
assert((Tok.is(tok::minus) || Tok.is(tok::plus)) && "expected +/-");
只是称他们为 "plus" 和 "minus"。 (另见ParseObjc.cpp line 322;同上。)
"Method type indicator" 对我来说听起来很合理,不过,如果你真的需要什么。我个人很容易理解你在说什么。
方法声明开头的 +
或 -
符号(分别用于 class 和实例方法)是否有名称?
我指的是 "method descriptor" 或 "method type indicator" 或类似的名称。
我同意
Decl *Parser::ParseObjCMethodPrototype(tok::ObjCKeywordKind MethodImplKind,
bool MethodDefinition) {
assert((Tok.is(tok::minus) || Tok.is(tok::plus)) && "expected +/-");
只是称他们为 "plus" 和 "minus"。 (另见ParseObjc.cpp line 322;同上。)
"Method type indicator" 对我来说听起来很合理,不过,如果你真的需要什么。我个人很容易理解你在说什么。