""" if not hasattr(self, '_displayname'): self._displayname = _getCursorDisplayName(self) -1186,6 +1217,14 self._displayname + def mangled_name(self): + """Return the mangled name for the entity referenced by this cursor.""" + if not hasattr(self, '_mangled_name'): + self._mangled_name = _Cursor_getMangling(self) + + return self._mangled_name + + def location(self): """ Return the source location (the starting character) of the entity -1208,6 +1247,17 self._extent + def storage_class(self): + """ + Retrieves the storage class (if any) of the entity pointed at by the + cursor. + The display name contains extra information that helps identify the + cursor, such as the parameters of a function or template or the + arguments of a class template specialization. The display name contains extra information that helps identify the cursor, - such as the parameters of a function or template or the arguments of a - class template specialization. + _kinds = + _name_map = None + +TemplateArgumentKind.NULL = TemplateArgumentKind(0) +TemplateArgumentKind.TYPE = TemplateArgumentKind(1) +TemplateArgumentKind.DECLARATION = TemplateArgumentKind(2) +TemplateArgumentKind.NULLPTR = TemplateArgumentKind(3) +TemplateArgumentKind.INTEGRAL = TemplateArgumentKind(4) + # Cursors # class Cursor(Structure): -1176,9 +1207,9 Return the display name for the entity referenced by this cursor. + """ + + # The required BaseEnumeration declarations. CursorKind.MODULE_IMPORT_DECL = CursorKind(600) + +# Template Argument Kinds # +class TemplateArgumentKind(BaseEnumeration): + """ + A TemplateArgumentKind describes the kind of entity that a template argument + represents. # Declaration Kinds -1086,6 +1098,7 = CursorKind(413) CursorKind.CUDAGLOBAL_ATTR = CursorKind(414) CursorKind.CUDAHOST_ATTR = CursorKind(415) +CursorKind.CUDASHARED_ATTR = CursorKind(416) # Preprocessing -1100,6 +1113,24 A module import declaration. The main -# things we want for sure are (a) simple external access to kinds, (b) a place -# to hang a description and name, (c) easy to keep in sync with Index.h. + _kinds = + _name_map = None def get_all_kinds(): -578,11 +595,6 _repr_(self): return 'CursorKind.%s' % (self.name,) -# FIXME: Is there a nicer way to expose this enumeration? We could potentially -# represent the nested structure, or even build a class hierarchy. +++ -240,7 +240,7 Add appropriate flags for GCC if (LLVM_COMPILER_IS_GCC_COMPATIBLE) - set(CMAKE_CXX_FLAGS "$ - for key,value in CursorKind._dict_.items(): - if isinstance(value,CursorKind): + for key, value in self._class_._dict_.items(): + if isinstance(value, self._class_): self._name_map = key return self._name_map - def from_id(id): - if id >= len(CursorKind._kinds) or CursorKind._kinds is None: - raise ValueError,'Unknown cursor kind %d' % id - return CursorKind._kinds + + def from_id(cls, id): + if id >= len(cls._kinds) or cls._kinds is None: + raise ValueError,'Unknown template argument kind %d' % id + return cls._kinds + + def _repr_(self): + return '%s.%s' % (self._class_, self.name,) + + +class CursorKind(BaseEnumeration): + """ + A CursorKind describes the kind of entity that a cursor points to. +++ -0,0 +1 '-*,clang-diagnostic-*,llvm-*,misc-*' diff -git a/CMakeLists.txt b/CMakeLists.txt Merge remote-tracking branch 'pnacl/master' into merge-pnacl-mar-13-2015
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |