aboutsummaryrefslogtreecommitdiff
path: root/bindings/python/clang/enumerations.py
diff options
context:
space:
mode:
authorGregory Szorc <gregory.szorc@gmail.com>2012-07-12 07:21:12 +0000
committerGregory Szorc <gregory.szorc@gmail.com>2012-07-12 07:21:12 +0000
commitbe51e43ba2c57b8032286af4e8713485b6dc78c3 (patch)
tree618a2b89bee02d2d2cba83e9a5fb76ff2e8dbdf8 /bindings/python/clang/enumerations.py
parent0f1964a5c1627bcc3fd658cdd1f139e30b0ad612 (diff)
[clang.py] Implement Token API
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160111 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings/python/clang/enumerations.py')
-rw-r--r--bindings/python/clang/enumerations.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/bindings/python/clang/enumerations.py b/bindings/python/clang/enumerations.py
new file mode 100644
index 0000000000..a86a48ade3
--- /dev/null
+++ b/bindings/python/clang/enumerations.py
@@ -0,0 +1,34 @@
+#===- enumerations.py - Python Enumerations ------------------*- python -*--===#
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+#===------------------------------------------------------------------------===#
+
+"""
+Clang Enumerations
+==================
+
+This module provides static definitions of enumerations that exist in libclang.
+
+Enumerations are typically defined as a list of tuples. The exported values are
+typically munged into other types or classes at module load time.
+
+All enumerations are centrally defined in this file so they are all grouped
+together and easier to audit. And, maybe even one day this file will be
+automatically generated by scanning the libclang headers!
+"""
+
+# Maps to CXTokenKind. Note that libclang maintains a separate set of token
+# enumerations from the C++ API.
+TokenKinds = [
+ ('PUNCTUATION', 0),
+ ('KEYWORD', 1),
+ ('IDENTIFIER', 2),
+ ('LITERAL', 3),
+ ('COMMENT', 4),
+]
+
+__all__ = ['TokenKinds']