@property<EOL><INDENT>def enum_value(self):<DEDENT>
if not hasattr(self, '<STR_LIT>'):<EOL><INDENT>assert self.kind == CursorKind.ENUM_CONSTANT_DECL<EOL>underlying_type = self.type<EOL>if underlying_type.kind == TypeKind.ENUM:<EOL><INDENT>underlying_type = underlying_type.get_declaration().enum_type<EOL><DEDENT>if underlying_type.kind in (TypeKind.CHAR_U,<EOL>TypeKind.UCHAR,<EOL>TypeKind.CHAR16,<EOL>TypeKind.CHAR32,<EOL>TypeKind.USHORT,<EOL>TypeKind.UINT,<EOL>TypeKind.ULONG,<EOL>TypeKind.ULONGLONG,<EOL>TypeKind.UINT128):<EOL><INDENT>self._enum_value =conf.lib.clang_getEnumConstantDeclUnsignedValue(self)<EOL><DEDENT>else:<EOL><INDENT>self._enum_value = conf.lib.clang_getEnumConstantDeclValue(self)<EOL><DEDENT><DEDENT>return self._enum_value<EOL>
Return the value of an enum constant.