summaryrefslogtreecommitdiff
path: root/pygments/lexers/_cocoabuiltins.py
diff options
context:
space:
mode:
Diffstat (limited to 'pygments/lexers/_cocoabuiltins.py')
-rw-r--r--pygments/lexers/_cocoabuiltins.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/pygments/lexers/_cocoabuiltins.py b/pygments/lexers/_cocoabuiltins.py
new file mode 100644
index 00000000..651a5708
--- /dev/null
+++ b/pygments/lexers/_cocoabuiltins.py
@@ -0,0 +1,32 @@
+import os
+import re
+
+FRAMEWORKS_PATH = '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/'
+frameworks = os.listdir(FRAMEWORKS_PATH)
+
+all_types = set()
+for framework in frameworks:
+ frameworkHeadersDir = FRAMEWORKS_PATH + framework + '/Headers/'
+ if (not os.path.exists(frameworkHeadersDir)): continue
+
+ headerFilenames = os.listdir(frameworkHeadersDir)
+
+ types = set()
+
+ for f in headerFilenames:
+ if (not f.endswith('.h')): continue
+
+ headerFilePath = frameworkHeadersDir + f
+ content = open(headerFilePath).read()
+ res = re.search('(?<=@interface )\w+', content)
+ if (res):
+ types.add(res.group(0))
+ all_types.add(res.group(0))
+
+
+ print framework + "\n"
+ # print types
+
+
+print "ALL: \n"
+print all_types \ No newline at end of file