summaryrefslogtreecommitdiff
path: root/tests/examplefiles/objc_example.m
diff options
context:
space:
mode:
authorthatch <devnull@localhost>2008-08-13 21:26:50 -0700
committerthatch <devnull@localhost>2008-08-13 21:26:50 -0700
commit290d8e5ea5bc60cca765efb53867a73fa7bb0ef4 (patch)
treeb81f01103a143d0f4935bff4f1695c6b2dd81f46 /tests/examplefiles/objc_example.m
parente226a0c052265321640ee474d63b1118cb65c036 (diff)
downloadpygments-290d8e5ea5bc60cca765efb53867a73fa7bb0ef4.tar.gz
Bring Objective C lexer up to date with 2.0 features
(properties and so-called "fast enumerations")
Diffstat (limited to 'tests/examplefiles/objc_example.m')
-rw-r--r--tests/examplefiles/objc_example.m11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/examplefiles/objc_example.m b/tests/examplefiles/objc_example.m
new file mode 100644
index 00000000..c2a1c414
--- /dev/null
+++ b/tests/examplefiles/objc_example.m
@@ -0,0 +1,11 @@
+#import "Somefile.h"
+
+NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:
+ @"quattuor", @"four", @"quinque", @"five", @"sex", @"six", nil];
+
+
+NSString *key;
+for (key in dictionary) {
+ NSLog(@"English: %@, Latin: %@", key, [dictionary valueForKey:key]);
+}
+