clangc 1.0.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/ext/clangc/_clangc_functions.c +303 -0
- data/ext/clangc/_clangc_functions.h +51 -0
- data/ext/clangc/clangc.c +376 -0
- data/ext/clangc/class_CodeCompleteResults.c +186 -0
- data/ext/clangc/class_CodeCompleteResults.h +51 -0
- data/ext/clangc/class_CompletionResult.c +98 -0
- data/ext/clangc/class_CompletionResult.h +36 -0
- data/ext/clangc/class_CompletionString.c +231 -0
- data/ext/clangc/class_CompletionString.h +57 -0
- data/ext/clangc/class_Cursor.c +1677 -0
- data/ext/clangc/class_Cursor.h +259 -0
- data/ext/clangc/class_CursorSet.c +109 -0
- data/ext/clangc/class_CursorSet.h +39 -0
- data/ext/clangc/class_Diagnostic.c +322 -0
- data/ext/clangc/class_Diagnostic.h +66 -0
- data/ext/clangc/class_File.c +145 -0
- data/ext/clangc/class_File.h +45 -0
- data/ext/clangc/class_Index.c +461 -0
- data/ext/clangc/class_Index.h +58 -0
- data/ext/clangc/class_Module.c +181 -0
- data/ext/clangc/class_Module.h +51 -0
- data/ext/clangc/class_OverriddenCursor.c +51 -0
- data/ext/clangc/class_OverriddenCursor.h +31 -0
- data/ext/clangc/class_SourceLocation.c +197 -0
- data/ext/clangc/class_SourceLocation.h +45 -0
- data/ext/clangc/class_SourceRange.c +123 -0
- data/ext/clangc/class_SourceRange.h +42 -0
- data/ext/clangc/class_TranslationUnit.c +457 -0
- data/ext/clangc/class_TranslationUnit.h +63 -0
- data/ext/clangc/class_Type.c +564 -0
- data/ext/clangc/class_Type.h +108 -0
- data/ext/clangc/constants.c +660 -0
- data/ext/clangc/constants.h +21 -0
- data/ext/clangc/extconf.rb +34 -0
- data/ext/clangc/macros.h +230 -0
- data/lib/clangc.rb +397 -0
- metadata +95 -0
@@ -0,0 +1,108 @@
|
|
1
|
+
/*
|
2
|
+
* ruby-clangc ruby bindings for the C interface of Clang
|
3
|
+
* Copyright (C) 2015-2016 Cedric Le Moigne cedlemo <cedlemo@gmx.com>
|
4
|
+
*
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
8
|
+
* (at your option) any later version.
|
9
|
+
*
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
* GNU General Public License for more details.
|
14
|
+
*
|
15
|
+
* You should have received a copy of the GNU General Public License
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
17
|
+
*/
|
18
|
+
#ifndef TYPE_H
|
19
|
+
#define TYPE_H
|
20
|
+
#include <ruby/ruby.h>
|
21
|
+
#include "clang-c/Index.h"
|
22
|
+
typedef struct Type_t
|
23
|
+
{
|
24
|
+
CXType data;
|
25
|
+
VALUE parent;
|
26
|
+
} Type_t;
|
27
|
+
|
28
|
+
VALUE
|
29
|
+
c_Type_struct_alloc(VALUE);
|
30
|
+
|
31
|
+
VALUE
|
32
|
+
c_Type_get_kind(VALUE);
|
33
|
+
|
34
|
+
VALUE
|
35
|
+
c_Type_get_spelling(VALUE);
|
36
|
+
|
37
|
+
VALUE
|
38
|
+
c_Type_is_equal(VALUE, VALUE);
|
39
|
+
|
40
|
+
VALUE
|
41
|
+
c_Type_get_canonical_type(VALUE);
|
42
|
+
|
43
|
+
VALUE
|
44
|
+
c_Type_get_pointee_type(VALUE);
|
45
|
+
|
46
|
+
VALUE
|
47
|
+
c_Type_is_const_qualified(VALUE);
|
48
|
+
|
49
|
+
VALUE
|
50
|
+
c_Type_is_volatile_qualified(VALUE);
|
51
|
+
|
52
|
+
VALUE
|
53
|
+
c_Type_is_restrict_qualified(VALUE);
|
54
|
+
|
55
|
+
VALUE
|
56
|
+
c_Type_get_result_type(VALUE);
|
57
|
+
|
58
|
+
VALUE
|
59
|
+
c_Type_get_calling_conv(VALUE);
|
60
|
+
|
61
|
+
VALUE
|
62
|
+
c_Type_get_num_arg_types(VALUE);
|
63
|
+
|
64
|
+
VALUE
|
65
|
+
c_Type_get_arg_type(VALUE, VALUE);
|
66
|
+
|
67
|
+
VALUE
|
68
|
+
c_Type_get_element_type(VALUE);
|
69
|
+
|
70
|
+
VALUE
|
71
|
+
c_Type_get_num_elements(VALUE);
|
72
|
+
|
73
|
+
VALUE
|
74
|
+
c_Type_get_array_element_type(VALUE);
|
75
|
+
|
76
|
+
VALUE
|
77
|
+
c_Type_get_array_size(VALUE);
|
78
|
+
|
79
|
+
VALUE
|
80
|
+
c_Type_is_pod(VALUE);
|
81
|
+
|
82
|
+
VALUE
|
83
|
+
c_Type_get_type_declaration(VALUE);
|
84
|
+
|
85
|
+
VALUE
|
86
|
+
c_Type_is_function_type_variadic(VALUE);
|
87
|
+
|
88
|
+
VALUE
|
89
|
+
c_Type_get_align_of(VALUE);
|
90
|
+
|
91
|
+
VALUE
|
92
|
+
c_Type_get_size_of(VALUE);
|
93
|
+
|
94
|
+
VALUE
|
95
|
+
c_Type_get_class_type(VALUE);
|
96
|
+
|
97
|
+
VALUE
|
98
|
+
c_Type_get_offset_of(VALUE, VALUE);
|
99
|
+
|
100
|
+
VALUE
|
101
|
+
c_Type_get_num_template_arguments(VALUE);
|
102
|
+
|
103
|
+
VALUE
|
104
|
+
c_Type_get_template_argument_as_type(VALUE, VALUE);
|
105
|
+
|
106
|
+
VALUE
|
107
|
+
c_Type_get_cxx_ref_qualifier(VALUE);
|
108
|
+
#endif // TYPE_H
|
@@ -0,0 +1,660 @@
|
|
1
|
+
|
2
|
+
/*
|
3
|
+
* ruby-clangc ruby bindings for the C interface of Clang
|
4
|
+
* Copyright (C) 2015 cedlemo <cedlemo@gmx.com>
|
5
|
+
*
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
7
|
+
* it under the terms of the GNU General Public License as published by
|
8
|
+
* the Free Software Foundation, either version 3 of the License, or
|
9
|
+
* (at your option) any later version.
|
10
|
+
*
|
11
|
+
* This program is distributed in the hope that it will be useful,
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
* GNU General Public License for more details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU General Public License
|
17
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
18
|
+
*/
|
19
|
+
#include "constants.h"
|
20
|
+
void init_clang_enums_to_constants(VALUE m_clang)
|
21
|
+
{
|
22
|
+
VALUE m_AvailabilityKind =
|
23
|
+
rb_define_module_under(m_clang, "AvailabilityKind");
|
24
|
+
rb_define_const(m_AvailabilityKind, "AVAILABLE", INT2NUM(0));
|
25
|
+
rb_define_const(m_AvailabilityKind, "DEPRECATED", INT2NUM(1));
|
26
|
+
rb_define_const(m_AvailabilityKind, "NOT_AVAILABLE", INT2NUM(2));
|
27
|
+
rb_define_const(m_AvailabilityKind, "NOT_ACCESSIBLE", INT2NUM(3));
|
28
|
+
|
29
|
+
VALUE m_GlobalOptFlags = rb_define_module_under(m_clang, "GlobalOptFlags");
|
30
|
+
rb_define_const(m_GlobalOptFlags, "NONE", INT2NUM(0));
|
31
|
+
rb_define_const(m_GlobalOptFlags,
|
32
|
+
"THREAD_BACKGROUND_PRIORITY_FOR_INDEXING",
|
33
|
+
INT2NUM(1));
|
34
|
+
rb_define_const(
|
35
|
+
m_GlobalOptFlags, "THREAD_BACKGROUND_PRIORITY_FOR_EDITING", INT2NUM(2));
|
36
|
+
rb_define_const(
|
37
|
+
m_GlobalOptFlags, "THREAD_BACKGROUND_PRIORITY_FOR_ALL", INT2NUM(3));
|
38
|
+
|
39
|
+
VALUE m_DiagnosticSeverity =
|
40
|
+
rb_define_module_under(m_clang, "DiagnosticSeverity");
|
41
|
+
rb_define_const(m_DiagnosticSeverity, "IGNORED", INT2NUM(0));
|
42
|
+
rb_define_const(m_DiagnosticSeverity, "NOTE", INT2NUM(1));
|
43
|
+
rb_define_const(m_DiagnosticSeverity, "WARNING", INT2NUM(2));
|
44
|
+
rb_define_const(m_DiagnosticSeverity, "ERROR", INT2NUM(3));
|
45
|
+
rb_define_const(m_DiagnosticSeverity, "FATAL", INT2NUM(4));
|
46
|
+
|
47
|
+
VALUE m_LoadDiag_Error = rb_define_module_under(m_clang, "LoadDiag_Error");
|
48
|
+
rb_define_const(m_LoadDiag_Error, "NONE", INT2NUM(0));
|
49
|
+
rb_define_const(m_LoadDiag_Error, "UNKNOWN", INT2NUM(1));
|
50
|
+
rb_define_const(m_LoadDiag_Error, "CANNOT_LOAD", INT2NUM(2));
|
51
|
+
rb_define_const(m_LoadDiag_Error, "INVALID_FILE", INT2NUM(3));
|
52
|
+
|
53
|
+
VALUE m_DiagnosticDisplayOptions =
|
54
|
+
rb_define_module_under(m_clang, "DiagnosticDisplayOptions");
|
55
|
+
rb_define_const(
|
56
|
+
m_DiagnosticDisplayOptions, "DISPLAY_SOURCE_LOCATION", INT2NUM(1));
|
57
|
+
rb_define_const(m_DiagnosticDisplayOptions, "DISPLAY_COLUMN", INT2NUM(2));
|
58
|
+
rb_define_const(
|
59
|
+
m_DiagnosticDisplayOptions, "DISPLAY_SOURCE_RANGES", INT2NUM(4));
|
60
|
+
rb_define_const(m_DiagnosticDisplayOptions, "DISPLAY_OPTION", INT2NUM(8));
|
61
|
+
rb_define_const(
|
62
|
+
m_DiagnosticDisplayOptions, "DISPLAY_CATEGORY_ID", INT2NUM(16));
|
63
|
+
rb_define_const(
|
64
|
+
m_DiagnosticDisplayOptions, "DISPLAY_CATEGORY_NAME", INT2NUM(32));
|
65
|
+
|
66
|
+
VALUE m_TranslationUnit_Flags =
|
67
|
+
rb_define_module_under(m_clang, "TranslationUnit_Flags");
|
68
|
+
rb_define_const(m_TranslationUnit_Flags, "NONE", INT2NUM(0));
|
69
|
+
rb_define_const(
|
70
|
+
m_TranslationUnit_Flags, "DETAILED_PREPROCESSING_RECORD", INT2NUM(1));
|
71
|
+
rb_define_const(m_TranslationUnit_Flags, "INCOMPLETE", INT2NUM(2));
|
72
|
+
rb_define_const(
|
73
|
+
m_TranslationUnit_Flags, "PRECOMPILED_PREAMBLE", INT2NUM(4));
|
74
|
+
rb_define_const(
|
75
|
+
m_TranslationUnit_Flags, "CACHE_COMPLETION_RESULTS", INT2NUM(8));
|
76
|
+
rb_define_const(m_TranslationUnit_Flags, "FOR_SERIALIZATION", INT2NUM(16));
|
77
|
+
rb_define_const(m_TranslationUnit_Flags, "CXX_CHAINED_PCH", INT2NUM(32));
|
78
|
+
rb_define_const(
|
79
|
+
m_TranslationUnit_Flags, "SKIP_FUNCTION_BODIES", INT2NUM(64));
|
80
|
+
rb_define_const(m_TranslationUnit_Flags,
|
81
|
+
"INCLUDE_BRIEF_COMMENTS_IN_CODE_COMPLETION",
|
82
|
+
INT2NUM(128));
|
83
|
+
|
84
|
+
VALUE m_SaveTranslationUnit_Flags =
|
85
|
+
rb_define_module_under(m_clang, "SaveTranslationUnit_Flags");
|
86
|
+
rb_define_const(m_SaveTranslationUnit_Flags, "NONE", INT2NUM(0));
|
87
|
+
|
88
|
+
VALUE m_SaveError = rb_define_module_under(m_clang, "SaveError");
|
89
|
+
rb_define_const(m_SaveError, "NONE", INT2NUM(0));
|
90
|
+
rb_define_const(m_SaveError, "UNKNOWN", INT2NUM(1));
|
91
|
+
rb_define_const(m_SaveError, "TRANSLATION_ERRORS", INT2NUM(2));
|
92
|
+
rb_define_const(m_SaveError, "INVALID_TU", INT2NUM(3));
|
93
|
+
|
94
|
+
VALUE m_Reparse_Flags = rb_define_module_under(m_clang, "Reparse_Flags");
|
95
|
+
rb_define_const(m_Reparse_Flags, "NONE", INT2NUM(0));
|
96
|
+
|
97
|
+
VALUE m_TUResourceUsageKind =
|
98
|
+
rb_define_module_under(m_clang, "TUResourceUsageKind");
|
99
|
+
rb_define_const(m_TUResourceUsageKind, "AST", INT2NUM(1));
|
100
|
+
rb_define_const(m_TUResourceUsageKind, "IDENTIFIERS", INT2NUM(2));
|
101
|
+
rb_define_const(m_TUResourceUsageKind, "SELECTORS", INT2NUM(3));
|
102
|
+
rb_define_const(
|
103
|
+
m_TUResourceUsageKind, "GLOBAL_COMPLETION_RESULTS", INT2NUM(4));
|
104
|
+
rb_define_const(
|
105
|
+
m_TUResourceUsageKind, "SOURCE_MANAGER_CONTENT_CACHE", INT2NUM(5));
|
106
|
+
rb_define_const(m_TUResourceUsageKind, "AST_SIDE_TABLES", INT2NUM(6));
|
107
|
+
rb_define_const(
|
108
|
+
m_TUResourceUsageKind, "SOURCE_MANAGER_MEMBUFFER_MALLOC", INT2NUM(7));
|
109
|
+
rb_define_const(
|
110
|
+
m_TUResourceUsageKind, "SOURCE_MANAGER_MEMBUFFER_M_MAP", INT2NUM(8));
|
111
|
+
rb_define_const(m_TUResourceUsageKind,
|
112
|
+
"EXTERNAL_AST_SOURCE_MEMBUFFER_MALLOC",
|
113
|
+
INT2NUM(9));
|
114
|
+
rb_define_const(m_TUResourceUsageKind,
|
115
|
+
"EXTERNAL_AST_SOURCE_MEMBUFFER_M_MAP",
|
116
|
+
INT2NUM(10));
|
117
|
+
rb_define_const(m_TUResourceUsageKind, "PREPROCESSOR", INT2NUM(11));
|
118
|
+
rb_define_const(m_TUResourceUsageKind, "PREPROCESSING_RECORD", INT2NUM(12));
|
119
|
+
rb_define_const(
|
120
|
+
m_TUResourceUsageKind, "SOURCE_MANAGER_DATA_STRUCTURES", INT2NUM(13));
|
121
|
+
rb_define_const(
|
122
|
+
m_TUResourceUsageKind, "PREPROCESSOR_HEADER_SEARCH", INT2NUM(14));
|
123
|
+
rb_define_const(m_TUResourceUsageKind, "MEMORY_IN_BYTES_BEGIN", INT2NUM(1));
|
124
|
+
rb_define_const(m_TUResourceUsageKind, "MEMORY_IN_BYTES_END", INT2NUM(14));
|
125
|
+
rb_define_const(m_TUResourceUsageKind, "FIRST", INT2NUM(1));
|
126
|
+
rb_define_const(m_TUResourceUsageKind, "LAST", INT2NUM(14));
|
127
|
+
|
128
|
+
VALUE m_CursorKind = rb_define_module_under(m_clang, "CursorKind");
|
129
|
+
rb_define_const(m_CursorKind, "UNEXPOSED_DECL", INT2NUM(1));
|
130
|
+
rb_define_const(m_CursorKind, "STRUCT_DECL", INT2NUM(2));
|
131
|
+
rb_define_const(m_CursorKind, "UNION_DECL", INT2NUM(3));
|
132
|
+
rb_define_const(m_CursorKind, "CLASS_DECL", INT2NUM(4));
|
133
|
+
rb_define_const(m_CursorKind, "ENUM_DECL", INT2NUM(5));
|
134
|
+
rb_define_const(m_CursorKind, "FIELD_DECL", INT2NUM(6));
|
135
|
+
rb_define_const(m_CursorKind, "ENUM_CONSTANT_DECL", INT2NUM(7));
|
136
|
+
rb_define_const(m_CursorKind, "FUNCTION_DECL", INT2NUM(8));
|
137
|
+
rb_define_const(m_CursorKind, "VAR_DECL", INT2NUM(9));
|
138
|
+
rb_define_const(m_CursorKind, "PARM_DECL", INT2NUM(10));
|
139
|
+
rb_define_const(m_CursorKind, "OBJ_C_INTERFACE_DECL", INT2NUM(11));
|
140
|
+
rb_define_const(m_CursorKind, "OBJ_C_CATEGORY_DECL", INT2NUM(12));
|
141
|
+
rb_define_const(m_CursorKind, "OBJ_C_PROTOCOL_DECL", INT2NUM(13));
|
142
|
+
rb_define_const(m_CursorKind, "OBJ_C_PROPERTY_DECL", INT2NUM(14));
|
143
|
+
rb_define_const(m_CursorKind, "OBJ_C_IVAR_DECL", INT2NUM(15));
|
144
|
+
rb_define_const(m_CursorKind, "OBJ_C_INSTANCE_METHOD_DECL", INT2NUM(16));
|
145
|
+
rb_define_const(m_CursorKind, "OBJ_C_CLASS_METHOD_DECL", INT2NUM(17));
|
146
|
+
rb_define_const(m_CursorKind, "OBJ_C_IMPLEMENTATION_DECL", INT2NUM(18));
|
147
|
+
rb_define_const(m_CursorKind, "OBJ_C_CATEGORY_IMPL_DECL", INT2NUM(19));
|
148
|
+
rb_define_const(m_CursorKind, "TYPEDEF_DECL", INT2NUM(20));
|
149
|
+
rb_define_const(m_CursorKind, "CXX_METHOD", INT2NUM(21));
|
150
|
+
rb_define_const(m_CursorKind, "NAMESPACE", INT2NUM(22));
|
151
|
+
rb_define_const(m_CursorKind, "LINKAGE_SPEC", INT2NUM(23));
|
152
|
+
rb_define_const(m_CursorKind, "CONSTRUCTOR", INT2NUM(24));
|
153
|
+
rb_define_const(m_CursorKind, "DESTRUCTOR", INT2NUM(25));
|
154
|
+
rb_define_const(m_CursorKind, "CONVERSION_FUNCTION", INT2NUM(26));
|
155
|
+
rb_define_const(m_CursorKind, "TEMPLATE_TYPE_PARAMETER", INT2NUM(27));
|
156
|
+
rb_define_const(m_CursorKind, "NON_TYPE_TEMPLATE_PARAMETER", INT2NUM(28));
|
157
|
+
rb_define_const(m_CursorKind, "TEMPLATE_TEMPLATE_PARAMETER", INT2NUM(29));
|
158
|
+
rb_define_const(m_CursorKind, "FUNCTION_TEMPLATE", INT2NUM(30));
|
159
|
+
rb_define_const(m_CursorKind, "CLASS_TEMPLATE", INT2NUM(31));
|
160
|
+
rb_define_const(
|
161
|
+
m_CursorKind, "CLASS_TEMPLATE_PARTIAL_SPECIALIZATION", INT2NUM(32));
|
162
|
+
rb_define_const(m_CursorKind, "NAMESPACE_ALIAS", INT2NUM(33));
|
163
|
+
rb_define_const(m_CursorKind, "USING_DIRECTIVE", INT2NUM(34));
|
164
|
+
rb_define_const(m_CursorKind, "USING_DECLARATION", INT2NUM(35));
|
165
|
+
rb_define_const(m_CursorKind, "TYPE_ALIAS_DECL", INT2NUM(36));
|
166
|
+
rb_define_const(m_CursorKind, "OBJ_C_SYNTHESIZE_DECL", INT2NUM(37));
|
167
|
+
rb_define_const(m_CursorKind, "OBJ_C_DYNAMIC_DECL", INT2NUM(38));
|
168
|
+
rb_define_const(m_CursorKind, "CXX_ACCESS_SPECIFIER", INT2NUM(39));
|
169
|
+
rb_define_const(m_CursorKind, "FIRST_DECL", INT2NUM(1));
|
170
|
+
rb_define_const(m_CursorKind, "LAST_DECL", INT2NUM(39));
|
171
|
+
rb_define_const(m_CursorKind, "FIRST_REF", INT2NUM(40));
|
172
|
+
rb_define_const(m_CursorKind, "OBJ_C_SUPER_CLASS_REF", INT2NUM(40));
|
173
|
+
rb_define_const(m_CursorKind, "OBJ_C_PROTOCOL_REF", INT2NUM(41));
|
174
|
+
rb_define_const(m_CursorKind, "OBJ_C_CLASS_REF", INT2NUM(42));
|
175
|
+
rb_define_const(m_CursorKind, "TYPE_REF", INT2NUM(43));
|
176
|
+
rb_define_const(m_CursorKind, "CXX_BASE_SPECIFIER", INT2NUM(44));
|
177
|
+
rb_define_const(m_CursorKind, "TEMPLATE_REF", INT2NUM(45));
|
178
|
+
rb_define_const(m_CursorKind, "NAMESPACE_REF", INT2NUM(46));
|
179
|
+
rb_define_const(m_CursorKind, "MEMBER_REF", INT2NUM(47));
|
180
|
+
rb_define_const(m_CursorKind, "LABEL_REF", INT2NUM(48));
|
181
|
+
rb_define_const(m_CursorKind, "OVERLOADED_DECL_REF", INT2NUM(49));
|
182
|
+
rb_define_const(m_CursorKind, "VARIABLE_REF", INT2NUM(50));
|
183
|
+
rb_define_const(m_CursorKind, "LAST_REF", INT2NUM(50));
|
184
|
+
rb_define_const(m_CursorKind, "FIRST_INVALID", INT2NUM(70));
|
185
|
+
rb_define_const(m_CursorKind, "INVALID_FILE", INT2NUM(70));
|
186
|
+
rb_define_const(m_CursorKind, "NO_DECL_FOUND", INT2NUM(71));
|
187
|
+
rb_define_const(m_CursorKind, "NOT_IMPLEMENTED", INT2NUM(72));
|
188
|
+
rb_define_const(m_CursorKind, "INVALID_CODE", INT2NUM(73));
|
189
|
+
rb_define_const(m_CursorKind, "LAST_INVALID", INT2NUM(73));
|
190
|
+
rb_define_const(m_CursorKind, "FIRST_EXPR", INT2NUM(100));
|
191
|
+
rb_define_const(m_CursorKind, "UNEXPOSED_EXPR", INT2NUM(100));
|
192
|
+
rb_define_const(m_CursorKind, "DECL_REF_EXPR", INT2NUM(101));
|
193
|
+
rb_define_const(m_CursorKind, "MEMBER_REF_EXPR", INT2NUM(102));
|
194
|
+
rb_define_const(m_CursorKind, "CALL_EXPR", INT2NUM(103));
|
195
|
+
rb_define_const(m_CursorKind, "OBJ_C_MESSAGE_EXPR", INT2NUM(104));
|
196
|
+
rb_define_const(m_CursorKind, "BLOCK_EXPR", INT2NUM(105));
|
197
|
+
rb_define_const(m_CursorKind, "INTEGER_LITERAL", INT2NUM(106));
|
198
|
+
rb_define_const(m_CursorKind, "FLOATING_LITERAL", INT2NUM(107));
|
199
|
+
rb_define_const(m_CursorKind, "IMAGINARY_LITERAL", INT2NUM(108));
|
200
|
+
rb_define_const(m_CursorKind, "STRING_LITERAL", INT2NUM(109));
|
201
|
+
rb_define_const(m_CursorKind, "CHARACTER_LITERAL", INT2NUM(110));
|
202
|
+
rb_define_const(m_CursorKind, "PAREN_EXPR", INT2NUM(111));
|
203
|
+
rb_define_const(m_CursorKind, "UNARY_OPERATOR", INT2NUM(112));
|
204
|
+
rb_define_const(m_CursorKind, "ARRAY_SUBSCRIPT_EXPR", INT2NUM(113));
|
205
|
+
rb_define_const(m_CursorKind, "BINARY_OPERATOR", INT2NUM(114));
|
206
|
+
rb_define_const(m_CursorKind, "COMPOUND_ASSIGN_OPERATOR", INT2NUM(115));
|
207
|
+
rb_define_const(m_CursorKind, "CONDITIONAL_OPERATOR", INT2NUM(116));
|
208
|
+
rb_define_const(m_CursorKind, "C_STYLE_CAST_EXPR", INT2NUM(117));
|
209
|
+
rb_define_const(m_CursorKind, "COMPOUND_LITERAL_EXPR", INT2NUM(118));
|
210
|
+
rb_define_const(m_CursorKind, "INIT_LIST_EXPR", INT2NUM(119));
|
211
|
+
rb_define_const(m_CursorKind, "ADDR_LABEL_EXPR", INT2NUM(120));
|
212
|
+
rb_define_const(m_CursorKind, "STMT_EXPR", INT2NUM(121));
|
213
|
+
rb_define_const(m_CursorKind, "GENERIC_SELECTION_EXPR", INT2NUM(122));
|
214
|
+
rb_define_const(m_CursorKind, "GNU_NULL_EXPR", INT2NUM(123));
|
215
|
+
rb_define_const(m_CursorKind, "CXX_STATIC_CAST_EXPR", INT2NUM(124));
|
216
|
+
rb_define_const(m_CursorKind, "CXX_DYNAMIC_CAST_EXPR", INT2NUM(125));
|
217
|
+
rb_define_const(m_CursorKind, "CXX_REINTERPRET_CAST_EXPR", INT2NUM(126));
|
218
|
+
rb_define_const(m_CursorKind, "CXX_CONST_CAST_EXPR", INT2NUM(127));
|
219
|
+
rb_define_const(m_CursorKind, "CXX_FUNCTIONAL_CAST_EXPR", INT2NUM(128));
|
220
|
+
rb_define_const(m_CursorKind, "CXX_TYPEID_EXPR", INT2NUM(129));
|
221
|
+
rb_define_const(m_CursorKind, "CXX_BOOL_LITERAL_EXPR", INT2NUM(130));
|
222
|
+
rb_define_const(m_CursorKind, "CXX_NULL_PTR_LITERAL_EXPR", INT2NUM(131));
|
223
|
+
rb_define_const(m_CursorKind, "CXX_THIS_EXPR", INT2NUM(132));
|
224
|
+
rb_define_const(m_CursorKind, "CXX_THROW_EXPR", INT2NUM(133));
|
225
|
+
rb_define_const(m_CursorKind, "CXX_NEW_EXPR", INT2NUM(134));
|
226
|
+
rb_define_const(m_CursorKind, "CXX_DELETE_EXPR", INT2NUM(135));
|
227
|
+
rb_define_const(m_CursorKind, "UNARY_EXPR", INT2NUM(136));
|
228
|
+
rb_define_const(m_CursorKind, "OBJ_C_STRING_LITERAL", INT2NUM(137));
|
229
|
+
rb_define_const(m_CursorKind, "OBJ_C_ENCODE_EXPR", INT2NUM(138));
|
230
|
+
rb_define_const(m_CursorKind, "OBJ_C_SELECTOR_EXPR", INT2NUM(139));
|
231
|
+
rb_define_const(m_CursorKind, "OBJ_C_PROTOCOL_EXPR", INT2NUM(140));
|
232
|
+
rb_define_const(m_CursorKind, "OBJ_C_BRIDGED_CAST_EXPR", INT2NUM(141));
|
233
|
+
rb_define_const(m_CursorKind, "PACK_EXPANSION_EXPR", INT2NUM(142));
|
234
|
+
rb_define_const(m_CursorKind, "SIZE_OF_PACK_EXPR", INT2NUM(143));
|
235
|
+
rb_define_const(m_CursorKind, "LAMBDA_EXPR", INT2NUM(144));
|
236
|
+
rb_define_const(m_CursorKind, "OBJ_C_BOOL_LITERAL_EXPR", INT2NUM(145));
|
237
|
+
rb_define_const(m_CursorKind, "OBJ_C_SELF_EXPR", INT2NUM(146));
|
238
|
+
rb_define_const(m_CursorKind, "LAST_EXPR", INT2NUM(146));
|
239
|
+
rb_define_const(m_CursorKind, "FIRST_STMT", INT2NUM(200));
|
240
|
+
rb_define_const(m_CursorKind, "UNEXPOSED_STMT", INT2NUM(200));
|
241
|
+
rb_define_const(m_CursorKind, "LABEL_STMT", INT2NUM(201));
|
242
|
+
rb_define_const(m_CursorKind, "COMPOUND_STMT", INT2NUM(202));
|
243
|
+
rb_define_const(m_CursorKind, "CASE_STMT", INT2NUM(203));
|
244
|
+
rb_define_const(m_CursorKind, "DEFAULT_STMT", INT2NUM(204));
|
245
|
+
rb_define_const(m_CursorKind, "IF_STMT", INT2NUM(205));
|
246
|
+
rb_define_const(m_CursorKind, "SWITCH_STMT", INT2NUM(206));
|
247
|
+
rb_define_const(m_CursorKind, "WHILE_STMT", INT2NUM(207));
|
248
|
+
rb_define_const(m_CursorKind, "DO_STMT", INT2NUM(208));
|
249
|
+
rb_define_const(m_CursorKind, "FOR_STMT", INT2NUM(209));
|
250
|
+
rb_define_const(m_CursorKind, "GOTO_STMT", INT2NUM(210));
|
251
|
+
rb_define_const(m_CursorKind, "INDIRECT_GOTO_STMT", INT2NUM(211));
|
252
|
+
rb_define_const(m_CursorKind, "CONTINUE_STMT", INT2NUM(212));
|
253
|
+
rb_define_const(m_CursorKind, "BREAK_STMT", INT2NUM(213));
|
254
|
+
rb_define_const(m_CursorKind, "RETURN_STMT", INT2NUM(214));
|
255
|
+
rb_define_const(m_CursorKind, "GCC_ASM_STMT", INT2NUM(215));
|
256
|
+
rb_define_const(m_CursorKind, "ASM_STMT", INT2NUM(215));
|
257
|
+
rb_define_const(m_CursorKind, "OBJ_C_AT_TRY_STMT", INT2NUM(216));
|
258
|
+
rb_define_const(m_CursorKind, "OBJ_C_AT_CATCH_STMT", INT2NUM(217));
|
259
|
+
rb_define_const(m_CursorKind, "OBJ_C_AT_FINALLY_STMT", INT2NUM(218));
|
260
|
+
rb_define_const(m_CursorKind, "OBJ_C_AT_THROW_STMT", INT2NUM(219));
|
261
|
+
rb_define_const(m_CursorKind, "OBJ_C_AT_SYNCHRONIZED_STMT", INT2NUM(220));
|
262
|
+
rb_define_const(m_CursorKind, "OBJ_C_AUTORELEASE_POOL_STMT", INT2NUM(221));
|
263
|
+
rb_define_const(m_CursorKind, "OBJ_C_FOR_COLLECTION_STMT", INT2NUM(222));
|
264
|
+
rb_define_const(m_CursorKind, "CXX_CATCH_STMT", INT2NUM(223));
|
265
|
+
rb_define_const(m_CursorKind, "CXX_TRY_STMT", INT2NUM(224));
|
266
|
+
rb_define_const(m_CursorKind, "CXX_FOR_RANGE_STMT", INT2NUM(225));
|
267
|
+
rb_define_const(m_CursorKind, "SEH_TRY_STMT", INT2NUM(226));
|
268
|
+
rb_define_const(m_CursorKind, "SEH_EXCEPT_STMT", INT2NUM(227));
|
269
|
+
rb_define_const(m_CursorKind, "SEH_FINALLY_STMT", INT2NUM(228));
|
270
|
+
rb_define_const(m_CursorKind, "MS_ASM_STMT", INT2NUM(229));
|
271
|
+
rb_define_const(m_CursorKind, "NULL_STMT", INT2NUM(230));
|
272
|
+
rb_define_const(m_CursorKind, "DECL_STMT", INT2NUM(231));
|
273
|
+
rb_define_const(m_CursorKind, "OMP_PARALLEL_DIRECTIVE", INT2NUM(232));
|
274
|
+
rb_define_const(m_CursorKind, "OMP_SIMD_DIRECTIVE", INT2NUM(233));
|
275
|
+
rb_define_const(m_CursorKind, "OMP_FOR_DIRECTIVE", INT2NUM(234));
|
276
|
+
rb_define_const(m_CursorKind, "OMP_SECTIONS_DIRECTIVE", INT2NUM(235));
|
277
|
+
rb_define_const(m_CursorKind, "OMP_SECTION_DIRECTIVE", INT2NUM(236));
|
278
|
+
rb_define_const(m_CursorKind, "OMP_SINGLE_DIRECTIVE", INT2NUM(237));
|
279
|
+
rb_define_const(m_CursorKind, "OMP_PARALLEL_FOR_DIRECTIVE", INT2NUM(238));
|
280
|
+
rb_define_const(
|
281
|
+
m_CursorKind, "OMP_PARALLEL_SECTIONS_DIRECTIVE", INT2NUM(239));
|
282
|
+
rb_define_const(m_CursorKind, "OMP_TASK_DIRECTIVE", INT2NUM(240));
|
283
|
+
rb_define_const(m_CursorKind, "OMP_MASTER_DIRECTIVE", INT2NUM(241));
|
284
|
+
rb_define_const(m_CursorKind, "OMP_CRITICAL_DIRECTIVE", INT2NUM(242));
|
285
|
+
rb_define_const(m_CursorKind, "OMP_TASKYIELD_DIRECTIVE", INT2NUM(243));
|
286
|
+
rb_define_const(m_CursorKind, "OMP_BARRIER_DIRECTIVE", INT2NUM(244));
|
287
|
+
rb_define_const(m_CursorKind, "OMP_TASKWAIT_DIRECTIVE", INT2NUM(245));
|
288
|
+
rb_define_const(m_CursorKind, "OMP_FLUSH_DIRECTIVE", INT2NUM(246));
|
289
|
+
rb_define_const(m_CursorKind, "SEH_LEAVE_STMT", INT2NUM(247));
|
290
|
+
rb_define_const(m_CursorKind, "OMP_ORDERED_DIRECTIVE", INT2NUM(248));
|
291
|
+
rb_define_const(m_CursorKind, "OMP_ATOMIC_DIRECTIVE", INT2NUM(249));
|
292
|
+
rb_define_const(m_CursorKind, "OMP_FOR_SIMD_DIRECTIVE", INT2NUM(250));
|
293
|
+
rb_define_const(
|
294
|
+
m_CursorKind, "OMP_PARALLEL_FOR_SIMD_DIRECTIVE", INT2NUM(251));
|
295
|
+
rb_define_const(m_CursorKind, "OMP_TARGET_DIRECTIVE", INT2NUM(252));
|
296
|
+
rb_define_const(m_CursorKind, "OMP_TEAMS_DIRECTIVE", INT2NUM(253));
|
297
|
+
rb_define_const(m_CursorKind, "OMP_TASKGROUP_DIRECTIVE", INT2NUM(254));
|
298
|
+
rb_define_const(
|
299
|
+
m_CursorKind, "OMP_CANCELLATION_POINT_DIRECTIVE", INT2NUM(255));
|
300
|
+
rb_define_const(m_CursorKind, "OMP_CANCEL_DIRECTIVE", INT2NUM(256));
|
301
|
+
rb_define_const(m_CursorKind, "LAST_STMT", INT2NUM(256));
|
302
|
+
rb_define_const(m_CursorKind, "TRANSLATION_UNIT", INT2NUM(300));
|
303
|
+
rb_define_const(m_CursorKind, "FIRST_ATTR", INT2NUM(400));
|
304
|
+
rb_define_const(m_CursorKind, "UNEXPOSED_ATTR", INT2NUM(400));
|
305
|
+
rb_define_const(m_CursorKind, "IB_ACTION_ATTR", INT2NUM(401));
|
306
|
+
rb_define_const(m_CursorKind, "IB_OUTLET_ATTR", INT2NUM(402));
|
307
|
+
rb_define_const(m_CursorKind, "IB_OUTLET_COLLECTION_ATTR", INT2NUM(403));
|
308
|
+
rb_define_const(m_CursorKind, "CXX_FINAL_ATTR", INT2NUM(404));
|
309
|
+
rb_define_const(m_CursorKind, "CXX_OVERRIDE_ATTR", INT2NUM(405));
|
310
|
+
rb_define_const(m_CursorKind, "ANNOTATE_ATTR", INT2NUM(406));
|
311
|
+
rb_define_const(m_CursorKind, "ASM_LABEL_ATTR", INT2NUM(407));
|
312
|
+
rb_define_const(m_CursorKind, "PACKED_ATTR", INT2NUM(408));
|
313
|
+
rb_define_const(m_CursorKind, "PURE_ATTR", INT2NUM(409));
|
314
|
+
rb_define_const(m_CursorKind, "CONST_ATTR", INT2NUM(410));
|
315
|
+
rb_define_const(m_CursorKind, "NO_DUPLICATE_ATTR", INT2NUM(411));
|
316
|
+
rb_define_const(m_CursorKind, "CUDA_CONSTANT_ATTR", INT2NUM(412));
|
317
|
+
rb_define_const(m_CursorKind, "CUDA_DEVICE_ATTR", INT2NUM(413));
|
318
|
+
rb_define_const(m_CursorKind, "CUDA_GLOBAL_ATTR", INT2NUM(414));
|
319
|
+
rb_define_const(m_CursorKind, "CUDA_HOST_ATTR", INT2NUM(415));
|
320
|
+
rb_define_const(m_CursorKind, "CUDA_SHARED_ATTR", INT2NUM(416));
|
321
|
+
rb_define_const(m_CursorKind, "LAST_ATTR", INT2NUM(416));
|
322
|
+
rb_define_const(m_CursorKind, "PREPROCESSING_DIRECTIVE", INT2NUM(500));
|
323
|
+
rb_define_const(m_CursorKind, "MACRO_DEFINITION", INT2NUM(501));
|
324
|
+
rb_define_const(m_CursorKind, "MACRO_EXPANSION", INT2NUM(502));
|
325
|
+
rb_define_const(m_CursorKind, "MACRO_INSTANTIATION", INT2NUM(502));
|
326
|
+
rb_define_const(m_CursorKind, "INCLUSION_DIRECTIVE", INT2NUM(503));
|
327
|
+
rb_define_const(m_CursorKind, "FIRST_PREPROCESSING", INT2NUM(500));
|
328
|
+
rb_define_const(m_CursorKind, "LAST_PREPROCESSING", INT2NUM(503));
|
329
|
+
rb_define_const(m_CursorKind, "MODULE_IMPORT_DECL", INT2NUM(600));
|
330
|
+
rb_define_const(m_CursorKind, "FIRST_EXTRA_DECL", INT2NUM(600));
|
331
|
+
rb_define_const(m_CursorKind, "LAST_EXTRA_DECL", INT2NUM(600));
|
332
|
+
rb_define_const(m_CursorKind, "OVERLOAD_CANDIDATE", INT2NUM(700));
|
333
|
+
|
334
|
+
VALUE m_LinkageKind = rb_define_module_under(m_clang, "LinkageKind");
|
335
|
+
rb_define_const(m_LinkageKind, "INVALID", INT2NUM(0));
|
336
|
+
rb_define_const(m_LinkageKind, "NO_LINKAGE", INT2NUM(1));
|
337
|
+
rb_define_const(m_LinkageKind, "INTERNAL", INT2NUM(2));
|
338
|
+
rb_define_const(m_LinkageKind, "UNIQUE_EXTERNAL", INT2NUM(3));
|
339
|
+
rb_define_const(m_LinkageKind, "EXTERNAL", INT2NUM(4));
|
340
|
+
|
341
|
+
VALUE m_LanguageKind = rb_define_module_under(m_clang, "LanguageKind");
|
342
|
+
rb_define_const(m_LanguageKind, "INVALID", INT2NUM(0));
|
343
|
+
rb_define_const(m_LanguageKind, "C", INT2NUM(1));
|
344
|
+
rb_define_const(m_LanguageKind, "OBJ_C", INT2NUM(2));
|
345
|
+
rb_define_const(m_LanguageKind, "C_PLUS_PLUS", INT2NUM(3));
|
346
|
+
|
347
|
+
VALUE m_TypeKind = rb_define_module_under(m_clang, "TypeKind");
|
348
|
+
rb_define_const(m_TypeKind, "INVALID", INT2NUM(0));
|
349
|
+
rb_define_const(m_TypeKind, "UNEXPOSED", INT2NUM(1));
|
350
|
+
rb_define_const(m_TypeKind, "VOID", INT2NUM(2));
|
351
|
+
rb_define_const(m_TypeKind, "BOOL", INT2NUM(3));
|
352
|
+
rb_define_const(m_TypeKind, "CHAR_U", INT2NUM(4));
|
353
|
+
rb_define_const(m_TypeKind, "U_CHAR", INT2NUM(5));
|
354
|
+
rb_define_const(m_TypeKind, "CHAR16", INT2NUM(6));
|
355
|
+
rb_define_const(m_TypeKind, "CHAR32", INT2NUM(7));
|
356
|
+
rb_define_const(m_TypeKind, "U_SHORT", INT2NUM(8));
|
357
|
+
rb_define_const(m_TypeKind, "U_INT", INT2NUM(9));
|
358
|
+
rb_define_const(m_TypeKind, "U_LONG", INT2NUM(10));
|
359
|
+
rb_define_const(m_TypeKind, "U_LONG_LONG", INT2NUM(11));
|
360
|
+
rb_define_const(m_TypeKind, "U_INT128", INT2NUM(12));
|
361
|
+
rb_define_const(m_TypeKind, "CHAR_S", INT2NUM(13));
|
362
|
+
rb_define_const(m_TypeKind, "S_CHAR", INT2NUM(14));
|
363
|
+
rb_define_const(m_TypeKind, "W_CHAR", INT2NUM(15));
|
364
|
+
rb_define_const(m_TypeKind, "SHORT", INT2NUM(16));
|
365
|
+
rb_define_const(m_TypeKind, "INT", INT2NUM(17));
|
366
|
+
rb_define_const(m_TypeKind, "LONG", INT2NUM(18));
|
367
|
+
rb_define_const(m_TypeKind, "LONG_LONG", INT2NUM(19));
|
368
|
+
rb_define_const(m_TypeKind, "INT128", INT2NUM(20));
|
369
|
+
rb_define_const(m_TypeKind, "FLOAT", INT2NUM(21));
|
370
|
+
rb_define_const(m_TypeKind, "DOUBLE", INT2NUM(22));
|
371
|
+
rb_define_const(m_TypeKind, "LONG_DOUBLE", INT2NUM(23));
|
372
|
+
rb_define_const(m_TypeKind, "NULL_PTR", INT2NUM(24));
|
373
|
+
rb_define_const(m_TypeKind, "OVERLOAD", INT2NUM(25));
|
374
|
+
rb_define_const(m_TypeKind, "DEPENDENT", INT2NUM(26));
|
375
|
+
rb_define_const(m_TypeKind, "OBJ_C_ID", INT2NUM(27));
|
376
|
+
rb_define_const(m_TypeKind, "OBJ_C_CLASS", INT2NUM(28));
|
377
|
+
rb_define_const(m_TypeKind, "OBJ_C_SEL", INT2NUM(29));
|
378
|
+
rb_define_const(m_TypeKind, "FIRST_BUILTIN", INT2NUM(2));
|
379
|
+
rb_define_const(m_TypeKind, "LAST_BUILTIN", INT2NUM(29));
|
380
|
+
rb_define_const(m_TypeKind, "COMPLEX", INT2NUM(100));
|
381
|
+
rb_define_const(m_TypeKind, "POINTER", INT2NUM(101));
|
382
|
+
rb_define_const(m_TypeKind, "BLOCK_POINTER", INT2NUM(102));
|
383
|
+
rb_define_const(m_TypeKind, "L_VALUE_REFERENCE", INT2NUM(103));
|
384
|
+
rb_define_const(m_TypeKind, "R_VALUE_REFERENCE", INT2NUM(104));
|
385
|
+
rb_define_const(m_TypeKind, "RECORD", INT2NUM(105));
|
386
|
+
rb_define_const(m_TypeKind, "ENUM", INT2NUM(106));
|
387
|
+
rb_define_const(m_TypeKind, "TYPEDEF", INT2NUM(107));
|
388
|
+
rb_define_const(m_TypeKind, "OBJ_C_INTERFACE", INT2NUM(108));
|
389
|
+
rb_define_const(m_TypeKind, "OBJ_C_OBJECT_POINTER", INT2NUM(109));
|
390
|
+
rb_define_const(m_TypeKind, "FUNCTION_NO_PROTO", INT2NUM(110));
|
391
|
+
rb_define_const(m_TypeKind, "FUNCTION_PROTO", INT2NUM(111));
|
392
|
+
rb_define_const(m_TypeKind, "CONSTANT_ARRAY", INT2NUM(112));
|
393
|
+
rb_define_const(m_TypeKind, "VECTOR", INT2NUM(113));
|
394
|
+
rb_define_const(m_TypeKind, "INCOMPLETE_ARRAY", INT2NUM(114));
|
395
|
+
rb_define_const(m_TypeKind, "VARIABLE_ARRAY", INT2NUM(115));
|
396
|
+
rb_define_const(m_TypeKind, "DEPENDENT_SIZED_ARRAY", INT2NUM(116));
|
397
|
+
rb_define_const(m_TypeKind, "MEMBER_POINTER", INT2NUM(117));
|
398
|
+
|
399
|
+
VALUE m_CallingConv = rb_define_module_under(m_clang, "CallingConv");
|
400
|
+
rb_define_const(m_CallingConv, "DEFAULT", INT2NUM(0));
|
401
|
+
rb_define_const(m_CallingConv, "C", INT2NUM(1));
|
402
|
+
rb_define_const(m_CallingConv, "X86_STD_CALL", INT2NUM(2));
|
403
|
+
rb_define_const(m_CallingConv, "X86_FAST_CALL", INT2NUM(3));
|
404
|
+
rb_define_const(m_CallingConv, "X86_THIS_CALL", INT2NUM(4));
|
405
|
+
rb_define_const(m_CallingConv, "X86_PASCAL", INT2NUM(5));
|
406
|
+
rb_define_const(m_CallingConv, "AAPCS", INT2NUM(6));
|
407
|
+
rb_define_const(m_CallingConv, "AAPCS_VFP", INT2NUM(7));
|
408
|
+
rb_define_const(m_CallingConv, "INTEL_OCL_BICC", INT2NUM(9));
|
409
|
+
rb_define_const(m_CallingConv, "X86_64_WIN64", INT2NUM(10));
|
410
|
+
rb_define_const(m_CallingConv, "X86_64_SYS_V", INT2NUM(11));
|
411
|
+
rb_define_const(m_CallingConv, "X86_VECTOR_CALL", INT2NUM(12));
|
412
|
+
rb_define_const(m_CallingConv, "INVALID", INT2NUM(100));
|
413
|
+
rb_define_const(m_CallingConv, "UNEXPOSED", INT2NUM(200));
|
414
|
+
|
415
|
+
VALUE m_TemplateArgumentKind =
|
416
|
+
rb_define_module_under(m_clang, "TemplateArgumentKind");
|
417
|
+
rb_define_const(m_TemplateArgumentKind, "NULL", INT2NUM(0));
|
418
|
+
rb_define_const(m_TemplateArgumentKind, "TYPE", INT2NUM(1));
|
419
|
+
rb_define_const(m_TemplateArgumentKind, "DECLARATION", INT2NUM(2));
|
420
|
+
rb_define_const(m_TemplateArgumentKind, "NULL_PTR", INT2NUM(3));
|
421
|
+
rb_define_const(m_TemplateArgumentKind, "INTEGRAL", INT2NUM(4));
|
422
|
+
rb_define_const(m_TemplateArgumentKind, "TEMPLATE", INT2NUM(5));
|
423
|
+
rb_define_const(m_TemplateArgumentKind, "TEMPLATE_EXPANSION", INT2NUM(6));
|
424
|
+
rb_define_const(m_TemplateArgumentKind, "EXPRESSION", INT2NUM(7));
|
425
|
+
rb_define_const(m_TemplateArgumentKind, "PACK", INT2NUM(8));
|
426
|
+
rb_define_const(m_TemplateArgumentKind, "INVALID", INT2NUM(9));
|
427
|
+
|
428
|
+
VALUE m_TypeLayoutError =
|
429
|
+
rb_define_module_under(m_clang, "TypeLayoutError");
|
430
|
+
rb_define_const(m_TypeLayoutError, "INVALID", INT2NUM(-1));
|
431
|
+
rb_define_const(m_TypeLayoutError, "INCOMPLETE", INT2NUM(-2));
|
432
|
+
rb_define_const(m_TypeLayoutError, "DEPENDENT", INT2NUM(-3));
|
433
|
+
rb_define_const(m_TypeLayoutError, "NOT_CONSTANT_SIZE", INT2NUM(-4));
|
434
|
+
rb_define_const(m_TypeLayoutError, "INVALID_FIELD_NAME", INT2NUM(-5));
|
435
|
+
|
436
|
+
VALUE m_RefQualifierKind =
|
437
|
+
rb_define_module_under(m_clang, "RefQualifierKind");
|
438
|
+
rb_define_const(m_RefQualifierKind, "NONE", INT2NUM(0));
|
439
|
+
rb_define_const(m_RefQualifierKind, "L_VALUE", INT2NUM(1));
|
440
|
+
rb_define_const(m_RefQualifierKind, "R_VALUE", INT2NUM(2));
|
441
|
+
|
442
|
+
VALUE m_CXXAccessSpecifier =
|
443
|
+
rb_define_module_under(m_clang, "CXXAccessSpecifier");
|
444
|
+
rb_define_const(
|
445
|
+
m_CXXAccessSpecifier, "CXX_INVALID_ACCESS_SPECIFIER", INT2NUM(0));
|
446
|
+
rb_define_const(m_CXXAccessSpecifier, "CXX_PUBLIC", INT2NUM(1));
|
447
|
+
rb_define_const(m_CXXAccessSpecifier, "CXX_PROTECTED", INT2NUM(2));
|
448
|
+
rb_define_const(m_CXXAccessSpecifier, "CXX_PRIVATE", INT2NUM(3));
|
449
|
+
|
450
|
+
VALUE m_StorageClass = rb_define_module_under(m_clang, "StorageClass");
|
451
|
+
rb_define_const(m_StorageClass, "SC_INVALID", INT2NUM(0));
|
452
|
+
rb_define_const(m_StorageClass, "SC_NONE", INT2NUM(1));
|
453
|
+
rb_define_const(m_StorageClass, "SC_EXTERN", INT2NUM(2));
|
454
|
+
rb_define_const(m_StorageClass, "SC_STATIC", INT2NUM(3));
|
455
|
+
rb_define_const(m_StorageClass, "SC_PRIVATE_EXTERN", INT2NUM(4));
|
456
|
+
rb_define_const(m_StorageClass, "SC_OPEN_CL_WORK_GROUP_LOCAL", INT2NUM(5));
|
457
|
+
rb_define_const(m_StorageClass, "SC_AUTO", INT2NUM(6));
|
458
|
+
rb_define_const(m_StorageClass, "SC_REGISTER", INT2NUM(7));
|
459
|
+
|
460
|
+
VALUE m_ChildVisitResult =
|
461
|
+
rb_define_module_under(m_clang, "ChildVisitResult");
|
462
|
+
rb_define_const(m_ChildVisitResult, "BREAK", INT2NUM(0));
|
463
|
+
rb_define_const(m_ChildVisitResult, "CONTINUE", INT2NUM(1));
|
464
|
+
rb_define_const(m_ChildVisitResult, "RECURSE", INT2NUM(2));
|
465
|
+
|
466
|
+
VALUE m_ObjCPropertyAttrKind =
|
467
|
+
rb_define_module_under(m_clang, "ObjCPropertyAttrKind");
|
468
|
+
rb_define_const(m_ObjCPropertyAttrKind, "NOATTR", INT2NUM(0));
|
469
|
+
rb_define_const(m_ObjCPropertyAttrKind, "READONLY", INT2NUM(1));
|
470
|
+
rb_define_const(m_ObjCPropertyAttrKind, "GETTER", INT2NUM(2));
|
471
|
+
rb_define_const(m_ObjCPropertyAttrKind, "ASSIGN", INT2NUM(4));
|
472
|
+
rb_define_const(m_ObjCPropertyAttrKind, "READWRITE", INT2NUM(8));
|
473
|
+
rb_define_const(m_ObjCPropertyAttrKind, "RETAIN", INT2NUM(16));
|
474
|
+
rb_define_const(m_ObjCPropertyAttrKind, "COPY", INT2NUM(32));
|
475
|
+
rb_define_const(m_ObjCPropertyAttrKind, "NONATOMIC", INT2NUM(64));
|
476
|
+
rb_define_const(m_ObjCPropertyAttrKind, "SETTER", INT2NUM(128));
|
477
|
+
rb_define_const(m_ObjCPropertyAttrKind, "ATOMIC", INT2NUM(256));
|
478
|
+
rb_define_const(m_ObjCPropertyAttrKind, "WEAK", INT2NUM(512));
|
479
|
+
rb_define_const(m_ObjCPropertyAttrKind, "STRONG", INT2NUM(1024));
|
480
|
+
rb_define_const(m_ObjCPropertyAttrKind, "UNSAFE_UNRETAINED", INT2NUM(2048));
|
481
|
+
|
482
|
+
VALUE m_ObjCDeclQualifierKind =
|
483
|
+
rb_define_module_under(m_clang, "ObjCDeclQualifierKind");
|
484
|
+
rb_define_const(m_ObjCDeclQualifierKind, "NONE", INT2NUM(0));
|
485
|
+
rb_define_const(m_ObjCDeclQualifierKind, "IN", INT2NUM(1));
|
486
|
+
rb_define_const(m_ObjCDeclQualifierKind, "INOUT", INT2NUM(2));
|
487
|
+
rb_define_const(m_ObjCDeclQualifierKind, "OUT", INT2NUM(4));
|
488
|
+
rb_define_const(m_ObjCDeclQualifierKind, "BYCOPY", INT2NUM(8));
|
489
|
+
rb_define_const(m_ObjCDeclQualifierKind, "BYREF", INT2NUM(16));
|
490
|
+
rb_define_const(m_ObjCDeclQualifierKind, "ONEWAY", INT2NUM(32));
|
491
|
+
|
492
|
+
VALUE m_NameRefFlags = rb_define_module_under(m_clang, "NameRefFlags");
|
493
|
+
rb_define_const(m_NameRefFlags, "WANT_QUALIFIER", INT2NUM(1));
|
494
|
+
rb_define_const(m_NameRefFlags, "WANT_TEMPLATE_ARGS", INT2NUM(2));
|
495
|
+
rb_define_const(m_NameRefFlags, "WANT_SINGLE_PIECE", INT2NUM(4));
|
496
|
+
|
497
|
+
VALUE m_TokenKind = rb_define_module_under(m_clang, "TokenKind");
|
498
|
+
rb_define_const(m_TokenKind, "PUNCTUATION", INT2NUM(0));
|
499
|
+
rb_define_const(m_TokenKind, "KEYWORD", INT2NUM(1));
|
500
|
+
rb_define_const(m_TokenKind, "IDENTIFIER", INT2NUM(2));
|
501
|
+
rb_define_const(m_TokenKind, "LITERAL", INT2NUM(3));
|
502
|
+
rb_define_const(m_TokenKind, "COMMENT", INT2NUM(4));
|
503
|
+
|
504
|
+
VALUE m_CompletionChunkKind =
|
505
|
+
rb_define_module_under(m_clang, "CompletionChunkKind");
|
506
|
+
rb_define_const(m_CompletionChunkKind, "OPTIONAL", INT2NUM(0));
|
507
|
+
rb_define_const(m_CompletionChunkKind, "TYPED_TEXT", INT2NUM(1));
|
508
|
+
rb_define_const(m_CompletionChunkKind, "TEXT", INT2NUM(2));
|
509
|
+
rb_define_const(m_CompletionChunkKind, "PLACEHOLDER", INT2NUM(3));
|
510
|
+
rb_define_const(m_CompletionChunkKind, "INFORMATIVE", INT2NUM(4));
|
511
|
+
rb_define_const(m_CompletionChunkKind, "CURRENT_PARAMETER", INT2NUM(5));
|
512
|
+
rb_define_const(m_CompletionChunkKind, "LEFT_PAREN", INT2NUM(6));
|
513
|
+
rb_define_const(m_CompletionChunkKind, "RIGHT_PAREN", INT2NUM(7));
|
514
|
+
rb_define_const(m_CompletionChunkKind, "LEFT_BRACKET", INT2NUM(8));
|
515
|
+
rb_define_const(m_CompletionChunkKind, "RIGHT_BRACKET", INT2NUM(9));
|
516
|
+
rb_define_const(m_CompletionChunkKind, "LEFT_BRACE", INT2NUM(10));
|
517
|
+
rb_define_const(m_CompletionChunkKind, "RIGHT_BRACE", INT2NUM(11));
|
518
|
+
rb_define_const(m_CompletionChunkKind, "LEFT_ANGLE", INT2NUM(12));
|
519
|
+
rb_define_const(m_CompletionChunkKind, "RIGHT_ANGLE", INT2NUM(13));
|
520
|
+
rb_define_const(m_CompletionChunkKind, "COMMA", INT2NUM(14));
|
521
|
+
rb_define_const(m_CompletionChunkKind, "RESULT_TYPE", INT2NUM(15));
|
522
|
+
rb_define_const(m_CompletionChunkKind, "COLON", INT2NUM(16));
|
523
|
+
rb_define_const(m_CompletionChunkKind, "SEMI_COLON", INT2NUM(17));
|
524
|
+
rb_define_const(m_CompletionChunkKind, "EQUAL", INT2NUM(18));
|
525
|
+
rb_define_const(m_CompletionChunkKind, "HORIZONTAL_SPACE", INT2NUM(19));
|
526
|
+
rb_define_const(m_CompletionChunkKind, "VERTICAL_SPACE", INT2NUM(20));
|
527
|
+
|
528
|
+
VALUE m_CodeComplete_Flags =
|
529
|
+
rb_define_module_under(m_clang, "CodeComplete_Flags");
|
530
|
+
rb_define_const(m_CodeComplete_Flags, "INCLUDE_MACROS", INT2NUM(1));
|
531
|
+
rb_define_const(m_CodeComplete_Flags, "INCLUDE_CODE_PATTERNS", INT2NUM(2));
|
532
|
+
rb_define_const(m_CodeComplete_Flags, "INCLUDE_BRIEF_COMMENTS", INT2NUM(4));
|
533
|
+
|
534
|
+
VALUE m_CompletionContext =
|
535
|
+
rb_define_module_under(m_clang, "CompletionContext");
|
536
|
+
rb_define_const(m_CompletionContext, "UNEXPOSED", INT2NUM(0));
|
537
|
+
rb_define_const(m_CompletionContext, "ANY_TYPE", INT2NUM(1));
|
538
|
+
rb_define_const(m_CompletionContext, "ANY_VALUE", INT2NUM(2));
|
539
|
+
rb_define_const(m_CompletionContext, "OBJ_C_OBJECT_VALUE", INT2NUM(4));
|
540
|
+
rb_define_const(m_CompletionContext, "OBJ_C_SELECTOR_VALUE", INT2NUM(8));
|
541
|
+
rb_define_const(m_CompletionContext, "CXX_CLASS_TYPE_VALUE", INT2NUM(16));
|
542
|
+
rb_define_const(m_CompletionContext, "DOT_MEMBER_ACCESS", INT2NUM(32));
|
543
|
+
rb_define_const(m_CompletionContext, "ARROW_MEMBER_ACCESS", INT2NUM(64));
|
544
|
+
rb_define_const(m_CompletionContext, "OBJ_C_PROPERTY_ACCESS", INT2NUM(128));
|
545
|
+
rb_define_const(m_CompletionContext, "ENUM_TAG", INT2NUM(256));
|
546
|
+
rb_define_const(m_CompletionContext, "UNION_TAG", INT2NUM(512));
|
547
|
+
rb_define_const(m_CompletionContext, "STRUCT_TAG", INT2NUM(1024));
|
548
|
+
rb_define_const(m_CompletionContext, "CLASS_TAG", INT2NUM(2048));
|
549
|
+
rb_define_const(m_CompletionContext, "NAMESPACE", INT2NUM(4096));
|
550
|
+
rb_define_const(
|
551
|
+
m_CompletionContext, "NESTED_NAME_SPECIFIER", INT2NUM(8192));
|
552
|
+
rb_define_const(m_CompletionContext, "OBJ_C_INTERFACE", INT2NUM(16384));
|
553
|
+
rb_define_const(m_CompletionContext, "OBJ_C_PROTOCOL", INT2NUM(32768));
|
554
|
+
rb_define_const(m_CompletionContext, "OBJ_C_CATEGORY", INT2NUM(65536));
|
555
|
+
rb_define_const(
|
556
|
+
m_CompletionContext, "OBJ_C_INSTANCE_MESSAGE", INT2NUM(131072));
|
557
|
+
rb_define_const(
|
558
|
+
m_CompletionContext, "OBJ_C_CLASS_MESSAGE", INT2NUM(262144));
|
559
|
+
rb_define_const(
|
560
|
+
m_CompletionContext, "OBJ_C_SELECTOR_NAME", INT2NUM(524288));
|
561
|
+
rb_define_const(m_CompletionContext, "MACRO_NAME", INT2NUM(1048576));
|
562
|
+
rb_define_const(m_CompletionContext, "NATURAL_LANGUAGE", INT2NUM(2097152));
|
563
|
+
rb_define_const(m_CompletionContext, "UNKNOWN", INT2NUM(4194303));
|
564
|
+
|
565
|
+
VALUE m_VisitorResult = rb_define_module_under(m_clang, "VisitorResult");
|
566
|
+
rb_define_const(m_VisitorResult, "BREAK", INT2NUM(0));
|
567
|
+
rb_define_const(m_VisitorResult, "CONTINUE", INT2NUM(1));
|
568
|
+
|
569
|
+
VALUE m_Result = rb_define_module_under(m_clang, "Result");
|
570
|
+
rb_define_const(m_Result, "SUCCESS", INT2NUM(0));
|
571
|
+
rb_define_const(m_Result, "INVALID", INT2NUM(1));
|
572
|
+
rb_define_const(m_Result, "VISIT_BREAK", INT2NUM(2));
|
573
|
+
|
574
|
+
VALUE m_IdxEntityKind = rb_define_module_under(m_clang, "IdxEntityKind");
|
575
|
+
rb_define_const(m_IdxEntityKind, "UNEXPOSED", INT2NUM(0));
|
576
|
+
rb_define_const(m_IdxEntityKind, "TYPEDEF", INT2NUM(1));
|
577
|
+
rb_define_const(m_IdxEntityKind, "FUNCTION", INT2NUM(2));
|
578
|
+
rb_define_const(m_IdxEntityKind, "VARIABLE", INT2NUM(3));
|
579
|
+
rb_define_const(m_IdxEntityKind, "FIELD", INT2NUM(4));
|
580
|
+
rb_define_const(m_IdxEntityKind, "ENUM_CONSTANT", INT2NUM(5));
|
581
|
+
rb_define_const(m_IdxEntityKind, "OBJ_C_CLASS", INT2NUM(6));
|
582
|
+
rb_define_const(m_IdxEntityKind, "OBJ_C_PROTOCOL", INT2NUM(7));
|
583
|
+
rb_define_const(m_IdxEntityKind, "OBJ_C_CATEGORY", INT2NUM(8));
|
584
|
+
rb_define_const(m_IdxEntityKind, "OBJ_C_INSTANCE_METHOD", INT2NUM(9));
|
585
|
+
rb_define_const(m_IdxEntityKind, "OBJ_C_CLASS_METHOD", INT2NUM(10));
|
586
|
+
rb_define_const(m_IdxEntityKind, "OBJ_C_PROPERTY", INT2NUM(11));
|
587
|
+
rb_define_const(m_IdxEntityKind, "OBJ_C_IVAR", INT2NUM(12));
|
588
|
+
rb_define_const(m_IdxEntityKind, "ENUM", INT2NUM(13));
|
589
|
+
rb_define_const(m_IdxEntityKind, "STRUCT", INT2NUM(14));
|
590
|
+
rb_define_const(m_IdxEntityKind, "UNION", INT2NUM(15));
|
591
|
+
rb_define_const(m_IdxEntityKind, "CXX_CLASS", INT2NUM(16));
|
592
|
+
rb_define_const(m_IdxEntityKind, "CXX_NAMESPACE", INT2NUM(17));
|
593
|
+
rb_define_const(m_IdxEntityKind, "CXX_NAMESPACE_ALIAS", INT2NUM(18));
|
594
|
+
rb_define_const(m_IdxEntityKind, "CXX_STATIC_VARIABLE", INT2NUM(19));
|
595
|
+
rb_define_const(m_IdxEntityKind, "CXX_STATIC_METHOD", INT2NUM(20));
|
596
|
+
rb_define_const(m_IdxEntityKind, "CXX_INSTANCE_METHOD", INT2NUM(21));
|
597
|
+
rb_define_const(m_IdxEntityKind, "CXX_CONSTRUCTOR", INT2NUM(22));
|
598
|
+
rb_define_const(m_IdxEntityKind, "CXX_DESTRUCTOR", INT2NUM(23));
|
599
|
+
rb_define_const(m_IdxEntityKind, "CXX_CONVERSION_FUNCTION", INT2NUM(24));
|
600
|
+
rb_define_const(m_IdxEntityKind, "CXX_TYPE_ALIAS", INT2NUM(25));
|
601
|
+
rb_define_const(m_IdxEntityKind, "CXX_INTERFACE", INT2NUM(26));
|
602
|
+
|
603
|
+
VALUE m_IdxEntityLanguage =
|
604
|
+
rb_define_module_under(m_clang, "IdxEntityLanguage");
|
605
|
+
rb_define_const(m_IdxEntityLanguage, "NONE", INT2NUM(0));
|
606
|
+
rb_define_const(m_IdxEntityLanguage, "C", INT2NUM(1));
|
607
|
+
rb_define_const(m_IdxEntityLanguage, "OBJ_C", INT2NUM(2));
|
608
|
+
rb_define_const(m_IdxEntityLanguage, "CXX", INT2NUM(3));
|
609
|
+
|
610
|
+
VALUE m_IdxEntityCXXTemplateKind =
|
611
|
+
rb_define_module_under(m_clang, "IdxEntityCXXTemplateKind");
|
612
|
+
rb_define_const(m_IdxEntityCXXTemplateKind, "NON_TEMPLATE", INT2NUM(0));
|
613
|
+
rb_define_const(m_IdxEntityCXXTemplateKind, "TEMPLATE", INT2NUM(1));
|
614
|
+
rb_define_const(m_IdxEntityCXXTemplateKind,
|
615
|
+
"TEMPLATE_PARTIAL_SPECIALIZATION",
|
616
|
+
INT2NUM(2));
|
617
|
+
rb_define_const(
|
618
|
+
m_IdxEntityCXXTemplateKind, "TEMPLATE_SPECIALIZATION", INT2NUM(3));
|
619
|
+
|
620
|
+
VALUE m_IdxAttrKind = rb_define_module_under(m_clang, "IdxAttrKind");
|
621
|
+
rb_define_const(m_IdxAttrKind, "UNEXPOSED", INT2NUM(0));
|
622
|
+
rb_define_const(m_IdxAttrKind, "IB_ACTION", INT2NUM(1));
|
623
|
+
rb_define_const(m_IdxAttrKind, "IB_OUTLET", INT2NUM(2));
|
624
|
+
rb_define_const(m_IdxAttrKind, "IB_OUTLET_COLLECTION", INT2NUM(3));
|
625
|
+
|
626
|
+
VALUE m_IdxDeclInfoFlags =
|
627
|
+
rb_define_module_under(m_clang, "IdxDeclInfoFlags");
|
628
|
+
rb_define_const(m_IdxDeclInfoFlags, "SKIPPED", INT2NUM(1));
|
629
|
+
|
630
|
+
VALUE m_IdxObjCContainerKind =
|
631
|
+
rb_define_module_under(m_clang, "IdxObjCContainerKind");
|
632
|
+
rb_define_const(m_IdxObjCContainerKind, "FORWARD_REF", INT2NUM(0));
|
633
|
+
rb_define_const(m_IdxObjCContainerKind, "INTERFACE", INT2NUM(1));
|
634
|
+
rb_define_const(m_IdxObjCContainerKind, "IMPLEMENTATION", INT2NUM(2));
|
635
|
+
|
636
|
+
VALUE m_IdxEntityRefKind =
|
637
|
+
rb_define_module_under(m_clang, "IdxEntityRefKind");
|
638
|
+
rb_define_const(m_IdxEntityRefKind, "DIRECT", INT2NUM(1));
|
639
|
+
rb_define_const(m_IdxEntityRefKind, "IMPLICIT", INT2NUM(2));
|
640
|
+
|
641
|
+
VALUE m_IndexOptFlags = rb_define_module_under(m_clang, "IndexOptFlags");
|
642
|
+
rb_define_const(m_IndexOptFlags, "NONE", INT2NUM(0));
|
643
|
+
rb_define_const(m_IndexOptFlags, "SUPPRESS_REDUNDANT_REFS", INT2NUM(1));
|
644
|
+
rb_define_const(
|
645
|
+
m_IndexOptFlags, "INDEX_FUNCTION_LOCAL_SYMBOLS", INT2NUM(2));
|
646
|
+
rb_define_const(
|
647
|
+
m_IndexOptFlags, "INDEX_IMPLICIT_TEMPLATE_INSTANTIATIONS", INT2NUM(4));
|
648
|
+
rb_define_const(m_IndexOptFlags, "SUPPRESS_WARNINGS", INT2NUM(8));
|
649
|
+
rb_define_const(
|
650
|
+
m_IndexOptFlags, "SKIP_PARSED_BODIES_IN_SESSION", INT2NUM(16));
|
651
|
+
}
|
652
|
+
void init_clang_errors_enums_to_constants(VALUE m_clang)
|
653
|
+
{
|
654
|
+
VALUE m_ErrorCode = rb_define_module_under(m_clang, "ErrorCode");
|
655
|
+
rb_define_const(m_ErrorCode, "SUCCESS", INT2NUM(0));
|
656
|
+
rb_define_const(m_ErrorCode, "FAILURE", INT2NUM(1));
|
657
|
+
rb_define_const(m_ErrorCode, "CRASHED", INT2NUM(2));
|
658
|
+
rb_define_const(m_ErrorCode, "INVALID_ARGUMENTS", INT2NUM(3));
|
659
|
+
rb_define_const(m_ErrorCode, "AST_READ_ERROR", INT2NUM(4));
|
660
|
+
}
|