aboutsummaryrefslogtreecommitdiff
path: root/Parse/Parser.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2007-08-31 16:11:31 +0000
committerFariborz Jahanian <fjahanian@apple.com>2007-08-31 16:11:31 +0000
commitd0f97d1716a138a8d9e0df8e5af77334663723d8 (patch)
treebe2c7b7d71bc0e9b5054d758c3f491576f02591c /Parse/Parser.cpp
parentd56d6b678f1cd6d34bc957a42453d1e237289048 (diff)
Author: F. Jahanian
Log: Implement parsing of objective-c's new @property declaration. Modified: include/clang/Basic/DiagnosticKinds.def include/clang/Parse/Parser.h Parse/ParseObjc.cpp Parse/Parser.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41644 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Parse/Parser.cpp')
-rw-r--r--Parse/Parser.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/Parse/Parser.cpp b/Parse/Parser.cpp
index 581d585a82..0a7ea58b04 100644
--- a/Parse/Parser.cpp
+++ b/Parse/Parser.cpp
@@ -258,6 +258,18 @@ void Parser::Initialize() {
ObjcTypeQuals[objc_bycopy] = &PP.getIdentifierTable().get("bycopy");
ObjcTypeQuals[objc_byref] = &PP.getIdentifierTable().get("byref");
}
+ if (getLang().ObjC2) {
+ ObjcPropertyAttrs[objc_readonly] = &PP.getIdentifierTable().get("readonly");
+ ObjcPropertyAttrs[objc_getter] = &PP.getIdentifierTable().get("getter");
+ ObjcPropertyAttrs[objc_setter] = &PP.getIdentifierTable().get("setter");
+ ObjcPropertyAttrs[objc_assign] = &PP.getIdentifierTable().get("assign");
+ ObjcPropertyAttrs[objc_readwrite] =
+ &PP.getIdentifierTable().get("readwrite");
+ ObjcPropertyAttrs[objc_retain] = &PP.getIdentifierTable().get("retain");
+ ObjcPropertyAttrs[objc_copy] = &PP.getIdentifierTable().get("copy");
+ ObjcPropertyAttrs[objc_nonatomic] =
+ &PP.getIdentifierTable().get("nonatomic");
+ }
}
/// ParseTopLevelDecl - Parse one top-level declaration, return whatever the