rbs 3.9.2 → 4.0.0.dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +1 -1
- data/.github/workflows/windows.yml +1 -1
- data/CHANGELOG.md +0 -13
- data/Rakefile +28 -21
- data/Steepfile +1 -0
- data/config.yml +232 -62
- data/ext/rbs_extension/ast_translation.c +1149 -0
- data/ext/rbs_extension/ast_translation.h +30 -0
- data/{src/constants.c → ext/rbs_extension/class_constants.c} +15 -1
- data/{include/rbs/constants.h → ext/rbs_extension/class_constants.h} +10 -1
- data/ext/rbs_extension/extconf.rb +3 -1
- data/ext/rbs_extension/{location.c → legacy_location.c} +25 -34
- data/ext/rbs_extension/legacy_location.h +40 -0
- data/ext/rbs_extension/main.c +402 -8
- data/ext/rbs_extension/rbs_extension.h +3 -21
- data/ext/rbs_extension/rbs_string_bridging.c +9 -0
- data/ext/rbs_extension/rbs_string_bridging.h +20 -0
- data/include/rbs/ast.h +748 -0
- data/include/rbs/defines.h +60 -0
- data/{ext/rbs_extension → include/rbs}/lexer.h +40 -32
- data/include/rbs/location.h +59 -0
- data/include/rbs/parser.h +151 -0
- data/include/rbs/string.h +49 -0
- data/include/rbs/util/rbs_allocator.h +38 -0
- data/include/rbs/util/rbs_assert.h +9 -0
- data/include/rbs/util/rbs_buffer.h +83 -0
- data/include/rbs/util/rbs_constant_pool.h +3 -64
- data/include/rbs/util/rbs_encoding.h +280 -0
- data/include/rbs/util/rbs_unescape.h +23 -0
- data/include/rbs.h +1 -2
- data/lib/rbs/annotate/formatter.rb +3 -13
- data/lib/rbs/annotate/rdoc_annotator.rb +3 -1
- data/lib/rbs/annotate/rdoc_source.rb +1 -1
- data/lib/rbs/ast/ruby/annotations.rb +119 -0
- data/lib/rbs/ast/ruby/comment_block.rb +221 -0
- data/lib/rbs/ast/ruby/declarations.rb +86 -0
- data/lib/rbs/ast/ruby/helpers/constant_helper.rb +24 -0
- data/lib/rbs/ast/ruby/helpers/location_helper.rb +15 -0
- data/lib/rbs/ast/ruby/members.rb +213 -0
- data/lib/rbs/buffer.rb +104 -24
- data/lib/rbs/cli/validate.rb +39 -34
- data/lib/rbs/cli.rb +4 -5
- data/lib/rbs/definition.rb +6 -1
- data/lib/rbs/definition_builder/ancestor_builder.rb +63 -60
- data/lib/rbs/definition_builder/method_builder.rb +45 -30
- data/lib/rbs/definition_builder.rb +44 -9
- data/lib/rbs/environment/class_entry.rb +69 -0
- data/lib/rbs/environment/module_entry.rb +66 -0
- data/lib/rbs/environment.rb +185 -154
- data/lib/rbs/environment_loader.rb +2 -2
- data/lib/rbs/errors.rb +4 -3
- data/lib/rbs/inline_parser/comment_association.rb +117 -0
- data/lib/rbs/inline_parser.rb +206 -0
- data/lib/rbs/location_aux.rb +35 -3
- data/lib/rbs/parser_aux.rb +11 -1
- data/lib/rbs/prototype/runtime.rb +2 -2
- data/lib/rbs/source.rb +99 -0
- data/lib/rbs/subtractor.rb +4 -3
- data/lib/rbs/version.rb +1 -1
- data/lib/rbs.rb +12 -0
- data/lib/rdoc/discover.rb +1 -1
- data/lib/rdoc_plugin/parser.rb +2 -2
- data/rbs.gemspec +1 -0
- data/sig/ancestor_builder.rbs +1 -1
- data/sig/annotate/formatter.rbs +2 -2
- data/sig/annotate/rdoc_annotater.rbs +1 -1
- data/sig/ast/ruby/annotations.rbs +110 -0
- data/sig/ast/ruby/comment_block.rbs +119 -0
- data/sig/ast/ruby/declarations.rbs +60 -0
- data/sig/ast/ruby/helpers/constant_helper.rbs +11 -0
- data/sig/ast/ruby/helpers/location_helper.rbs +15 -0
- data/sig/ast/ruby/members.rbs +72 -0
- data/sig/buffer.rbs +63 -5
- data/sig/definition.rbs +1 -0
- data/sig/definition_builder.rbs +1 -1
- data/sig/environment/class_entry.rbs +50 -0
- data/sig/environment/module_entry.rbs +50 -0
- data/sig/environment.rbs +22 -76
- data/sig/errors.rbs +13 -6
- data/sig/inline_parser/comment_association.rbs +71 -0
- data/sig/inline_parser.rbs +87 -0
- data/sig/location.rbs +32 -7
- data/sig/method_builder.rbs +7 -4
- data/sig/parser.rbs +16 -0
- data/sig/source.rbs +48 -0
- data/src/ast.c +1345 -0
- data/src/lexer.c +2867 -0
- data/src/lexer.re +151 -0
- data/{ext/rbs_extension → src}/lexstate.c +58 -42
- data/src/location.c +71 -0
- data/src/parser.c +3739 -0
- data/src/string.c +89 -0
- data/src/util/rbs_allocator.c +149 -0
- data/src/util/rbs_assert.c +19 -0
- data/src/util/rbs_buffer.c +54 -0
- data/src/util/rbs_constant_pool.c +13 -81
- data/src/util/rbs_encoding.c +5273 -0
- data/src/util/rbs_unescape.c +130 -0
- data/stdlib/rdoc/0/code_object.rbs +2 -2
- data/stdlib/rdoc/0/comment.rbs +2 -0
- data/stdlib/rdoc/0/options.rbs +76 -0
- data/stdlib/rdoc/0/rdoc.rbs +6 -4
- data/stdlib/rdoc/0/store.rbs +1 -1
- metadata +70 -17
- data/ext/rbs_extension/lexer.c +0 -2728
- data/ext/rbs_extension/lexer.re +0 -147
- data/ext/rbs_extension/location.h +0 -85
- data/ext/rbs_extension/parser.c +0 -2982
- data/ext/rbs_extension/parser.h +0 -18
- data/ext/rbs_extension/parserstate.c +0 -411
- data/ext/rbs_extension/parserstate.h +0 -163
- data/ext/rbs_extension/unescape.c +0 -32
- data/include/rbs/ruby_objs.h +0 -72
- data/src/ruby_objs.c +0 -799
data/include/rbs/ast.h
ADDED
@@ -0,0 +1,748 @@
|
|
1
|
+
/*----------------------------------------------------------------------------*/
|
2
|
+
/* This file is generated by the templates/template.rb script and should not */
|
3
|
+
/* be modified manually. */
|
4
|
+
/* To change the template see */
|
5
|
+
/* templates/include/rbs/ast.h.erb */
|
6
|
+
/*----------------------------------------------------------------------------*/
|
7
|
+
|
8
|
+
#ifndef RBS__AST_H
|
9
|
+
#define RBS__AST_H
|
10
|
+
|
11
|
+
#include "rbs/util/rbs_allocator.h"
|
12
|
+
#include "rbs/util/rbs_constant_pool.h"
|
13
|
+
#include "string.h"
|
14
|
+
#include "location.h"
|
15
|
+
|
16
|
+
enum rbs_node_type {
|
17
|
+
RBS_AST_ANNOTATION = 1,
|
18
|
+
RBS_AST_BOOL = 2,
|
19
|
+
RBS_AST_COMMENT = 3,
|
20
|
+
RBS_AST_DECLARATIONS_CLASS = 4,
|
21
|
+
RBS_AST_DECLARATIONS_CLASS_SUPER = 5,
|
22
|
+
RBS_AST_DECLARATIONS_CLASS_ALIAS = 6,
|
23
|
+
RBS_AST_DECLARATIONS_CONSTANT = 7,
|
24
|
+
RBS_AST_DECLARATIONS_GLOBAL = 8,
|
25
|
+
RBS_AST_DECLARATIONS_INTERFACE = 9,
|
26
|
+
RBS_AST_DECLARATIONS_MODULE = 10,
|
27
|
+
RBS_AST_DECLARATIONS_MODULE_SELF = 11,
|
28
|
+
RBS_AST_DECLARATIONS_MODULE_ALIAS = 12,
|
29
|
+
RBS_AST_DECLARATIONS_TYPE_ALIAS = 13,
|
30
|
+
RBS_AST_DIRECTIVES_USE = 14,
|
31
|
+
RBS_AST_DIRECTIVES_USE_SINGLE_CLAUSE = 15,
|
32
|
+
RBS_AST_DIRECTIVES_USE_WILDCARD_CLAUSE = 16,
|
33
|
+
RBS_AST_INTEGER = 17,
|
34
|
+
RBS_AST_MEMBERS_ALIAS = 18,
|
35
|
+
RBS_AST_MEMBERS_ATTR_ACCESSOR = 19,
|
36
|
+
RBS_AST_MEMBERS_ATTR_READER = 20,
|
37
|
+
RBS_AST_MEMBERS_ATTR_WRITER = 21,
|
38
|
+
RBS_AST_MEMBERS_CLASS_INSTANCE_VARIABLE = 22,
|
39
|
+
RBS_AST_MEMBERS_CLASS_VARIABLE = 23,
|
40
|
+
RBS_AST_MEMBERS_EXTEND = 24,
|
41
|
+
RBS_AST_MEMBERS_INCLUDE = 25,
|
42
|
+
RBS_AST_MEMBERS_INSTANCE_VARIABLE = 26,
|
43
|
+
RBS_AST_MEMBERS_METHOD_DEFINITION = 27,
|
44
|
+
RBS_AST_MEMBERS_METHOD_DEFINITION_OVERLOAD = 28,
|
45
|
+
RBS_AST_MEMBERS_PREPEND = 29,
|
46
|
+
RBS_AST_MEMBERS_PRIVATE = 30,
|
47
|
+
RBS_AST_MEMBERS_PUBLIC = 31,
|
48
|
+
RBS_AST_RUBY_ANNOTATIONS_COLON_METHOD_TYPE_ANNOTATION = 32,
|
49
|
+
RBS_AST_RUBY_ANNOTATIONS_METHOD_TYPES_ANNOTATION = 33,
|
50
|
+
RBS_AST_RUBY_ANNOTATIONS_NODE_TYPE_ASSERTION = 34,
|
51
|
+
RBS_AST_RUBY_ANNOTATIONS_RETURN_TYPE_ANNOTATION = 35,
|
52
|
+
RBS_AST_RUBY_ANNOTATIONS_SKIP_ANNOTATION = 36,
|
53
|
+
RBS_AST_STRING = 37,
|
54
|
+
RBS_AST_TYPE_PARAM = 38,
|
55
|
+
RBS_METHOD_TYPE = 39,
|
56
|
+
RBS_NAMESPACE = 40,
|
57
|
+
RBS_SIGNATURE = 41,
|
58
|
+
RBS_TYPE_NAME = 42,
|
59
|
+
RBS_TYPES_ALIAS = 43,
|
60
|
+
RBS_TYPES_BASES_ANY = 44,
|
61
|
+
RBS_TYPES_BASES_BOOL = 45,
|
62
|
+
RBS_TYPES_BASES_BOTTOM = 46,
|
63
|
+
RBS_TYPES_BASES_CLASS = 47,
|
64
|
+
RBS_TYPES_BASES_INSTANCE = 48,
|
65
|
+
RBS_TYPES_BASES_NIL = 49,
|
66
|
+
RBS_TYPES_BASES_SELF = 50,
|
67
|
+
RBS_TYPES_BASES_TOP = 51,
|
68
|
+
RBS_TYPES_BASES_VOID = 52,
|
69
|
+
RBS_TYPES_BLOCK = 53,
|
70
|
+
RBS_TYPES_CLASS_INSTANCE = 54,
|
71
|
+
RBS_TYPES_CLASS_SINGLETON = 55,
|
72
|
+
RBS_TYPES_FUNCTION = 56,
|
73
|
+
RBS_TYPES_FUNCTION_PARAM = 57,
|
74
|
+
RBS_TYPES_INTERFACE = 58,
|
75
|
+
RBS_TYPES_INTERSECTION = 59,
|
76
|
+
RBS_TYPES_LITERAL = 60,
|
77
|
+
RBS_TYPES_OPTIONAL = 61,
|
78
|
+
RBS_TYPES_PROC = 62,
|
79
|
+
RBS_TYPES_RECORD = 63,
|
80
|
+
RBS_TYPES_RECORD_FIELD_TYPE = 64,
|
81
|
+
RBS_TYPES_TUPLE = 65,
|
82
|
+
RBS_TYPES_UNION = 66,
|
83
|
+
RBS_TYPES_UNTYPED_FUNCTION = 67,
|
84
|
+
RBS_TYPES_VARIABLE = 68,
|
85
|
+
RBS_KEYWORD,
|
86
|
+
RBS_AST_SYMBOL,
|
87
|
+
};
|
88
|
+
|
89
|
+
typedef struct rbs_node {
|
90
|
+
enum rbs_node_type type;
|
91
|
+
rbs_location_t *location;
|
92
|
+
} rbs_node_t;
|
93
|
+
|
94
|
+
const char* rbs_node_type_name(rbs_node_t *node);
|
95
|
+
|
96
|
+
/* rbs_node_list_node */
|
97
|
+
|
98
|
+
typedef struct rbs_node_list_node {
|
99
|
+
rbs_node_t *node;
|
100
|
+
struct rbs_node_list_node *next;
|
101
|
+
} rbs_node_list_node_t;
|
102
|
+
|
103
|
+
typedef struct rbs_node_list {
|
104
|
+
rbs_allocator_t *allocator;
|
105
|
+
rbs_node_list_node_t *head;
|
106
|
+
rbs_node_list_node_t *tail;
|
107
|
+
size_t length;
|
108
|
+
} rbs_node_list_t;
|
109
|
+
|
110
|
+
rbs_node_list_t* rbs_node_list_new(rbs_allocator_t *);
|
111
|
+
|
112
|
+
void rbs_node_list_append(rbs_node_list_t *list, rbs_node_t *node);
|
113
|
+
|
114
|
+
/* rbs_hash */
|
115
|
+
|
116
|
+
typedef struct rbs_hash_node {
|
117
|
+
rbs_node_t *key;
|
118
|
+
rbs_node_t *value;
|
119
|
+
struct rbs_hash_node *next;
|
120
|
+
} rbs_hash_node_t;
|
121
|
+
|
122
|
+
typedef struct rbs_hash {
|
123
|
+
rbs_allocator_t *allocator;
|
124
|
+
rbs_hash_node_t *head;
|
125
|
+
rbs_hash_node_t *tail;
|
126
|
+
size_t length;
|
127
|
+
} rbs_hash_t;
|
128
|
+
|
129
|
+
rbs_hash_t* rbs_hash_new(rbs_allocator_t *);
|
130
|
+
|
131
|
+
void rbs_hash_set(rbs_hash_t *hash, rbs_node_t *key, rbs_node_t *value);
|
132
|
+
|
133
|
+
rbs_hash_node_t* rbs_hash_find(rbs_hash_t *hash, rbs_node_t *key);
|
134
|
+
|
135
|
+
rbs_node_t* rbs_hash_get(rbs_hash_t *hash, rbs_node_t *key);
|
136
|
+
|
137
|
+
/* rbs_ast_node */
|
138
|
+
|
139
|
+
typedef struct rbs_ast_annotation {
|
140
|
+
rbs_node_t base;
|
141
|
+
|
142
|
+
rbs_string_t string;
|
143
|
+
} rbs_ast_annotation_t;
|
144
|
+
|
145
|
+
typedef struct rbs_ast_bool {
|
146
|
+
rbs_node_t base;
|
147
|
+
|
148
|
+
bool value;
|
149
|
+
} rbs_ast_bool_t;
|
150
|
+
|
151
|
+
typedef struct rbs_ast_comment {
|
152
|
+
rbs_node_t base;
|
153
|
+
|
154
|
+
rbs_string_t string;
|
155
|
+
} rbs_ast_comment_t;
|
156
|
+
|
157
|
+
typedef struct rbs_ast_declarations_class {
|
158
|
+
rbs_node_t base;
|
159
|
+
|
160
|
+
struct rbs_type_name *name;
|
161
|
+
struct rbs_node_list *type_params;
|
162
|
+
struct rbs_ast_declarations_class_super *super_class;
|
163
|
+
struct rbs_node_list *members;
|
164
|
+
struct rbs_node_list *annotations;
|
165
|
+
struct rbs_ast_comment *comment;
|
166
|
+
} rbs_ast_declarations_class_t;
|
167
|
+
|
168
|
+
typedef struct rbs_ast_declarations_class_super {
|
169
|
+
rbs_node_t base;
|
170
|
+
|
171
|
+
struct rbs_type_name *name;
|
172
|
+
struct rbs_node_list *args;
|
173
|
+
} rbs_ast_declarations_class_super_t;
|
174
|
+
|
175
|
+
typedef struct rbs_ast_declarations_class_alias {
|
176
|
+
rbs_node_t base;
|
177
|
+
|
178
|
+
struct rbs_type_name *new_name;
|
179
|
+
struct rbs_type_name *old_name;
|
180
|
+
struct rbs_ast_comment *comment;
|
181
|
+
struct rbs_node_list *annotations;
|
182
|
+
} rbs_ast_declarations_class_alias_t;
|
183
|
+
|
184
|
+
typedef struct rbs_ast_declarations_constant {
|
185
|
+
rbs_node_t base;
|
186
|
+
|
187
|
+
struct rbs_type_name *name;
|
188
|
+
struct rbs_node *type;
|
189
|
+
struct rbs_ast_comment *comment;
|
190
|
+
struct rbs_node_list *annotations;
|
191
|
+
} rbs_ast_declarations_constant_t;
|
192
|
+
|
193
|
+
typedef struct rbs_ast_declarations_global {
|
194
|
+
rbs_node_t base;
|
195
|
+
|
196
|
+
struct rbs_ast_symbol *name;
|
197
|
+
struct rbs_node *type;
|
198
|
+
struct rbs_ast_comment *comment;
|
199
|
+
struct rbs_node_list *annotations;
|
200
|
+
} rbs_ast_declarations_global_t;
|
201
|
+
|
202
|
+
typedef struct rbs_ast_declarations_interface {
|
203
|
+
rbs_node_t base;
|
204
|
+
|
205
|
+
struct rbs_type_name *name;
|
206
|
+
struct rbs_node_list *type_params;
|
207
|
+
struct rbs_node_list *members;
|
208
|
+
struct rbs_node_list *annotations;
|
209
|
+
struct rbs_ast_comment *comment;
|
210
|
+
} rbs_ast_declarations_interface_t;
|
211
|
+
|
212
|
+
typedef struct rbs_ast_declarations_module {
|
213
|
+
rbs_node_t base;
|
214
|
+
|
215
|
+
struct rbs_type_name *name;
|
216
|
+
struct rbs_node_list *type_params;
|
217
|
+
struct rbs_node_list *self_types;
|
218
|
+
struct rbs_node_list *members;
|
219
|
+
struct rbs_node_list *annotations;
|
220
|
+
struct rbs_ast_comment *comment;
|
221
|
+
} rbs_ast_declarations_module_t;
|
222
|
+
|
223
|
+
typedef struct rbs_ast_declarations_module_self {
|
224
|
+
rbs_node_t base;
|
225
|
+
|
226
|
+
struct rbs_type_name *name;
|
227
|
+
struct rbs_node_list *args;
|
228
|
+
} rbs_ast_declarations_module_self_t;
|
229
|
+
|
230
|
+
typedef struct rbs_ast_declarations_module_alias {
|
231
|
+
rbs_node_t base;
|
232
|
+
|
233
|
+
struct rbs_type_name *new_name;
|
234
|
+
struct rbs_type_name *old_name;
|
235
|
+
struct rbs_ast_comment *comment;
|
236
|
+
struct rbs_node_list *annotations;
|
237
|
+
} rbs_ast_declarations_module_alias_t;
|
238
|
+
|
239
|
+
typedef struct rbs_ast_declarations_type_alias {
|
240
|
+
rbs_node_t base;
|
241
|
+
|
242
|
+
struct rbs_type_name *name;
|
243
|
+
struct rbs_node_list *type_params;
|
244
|
+
struct rbs_node *type;
|
245
|
+
struct rbs_node_list *annotations;
|
246
|
+
struct rbs_ast_comment *comment;
|
247
|
+
} rbs_ast_declarations_type_alias_t;
|
248
|
+
|
249
|
+
typedef struct rbs_ast_directives_use {
|
250
|
+
rbs_node_t base;
|
251
|
+
|
252
|
+
struct rbs_node_list *clauses;
|
253
|
+
} rbs_ast_directives_use_t;
|
254
|
+
|
255
|
+
typedef struct rbs_ast_directives_use_single_clause {
|
256
|
+
rbs_node_t base;
|
257
|
+
|
258
|
+
struct rbs_type_name *type_name;
|
259
|
+
struct rbs_ast_symbol *new_name;
|
260
|
+
} rbs_ast_directives_use_single_clause_t;
|
261
|
+
|
262
|
+
typedef struct rbs_ast_directives_use_wildcard_clause {
|
263
|
+
rbs_node_t base;
|
264
|
+
|
265
|
+
struct rbs_namespace *rbs_namespace;
|
266
|
+
} rbs_ast_directives_use_wildcard_clause_t;
|
267
|
+
|
268
|
+
typedef struct rbs_ast_integer {
|
269
|
+
rbs_node_t base;
|
270
|
+
|
271
|
+
rbs_string_t string_representation;
|
272
|
+
} rbs_ast_integer_t;
|
273
|
+
|
274
|
+
typedef struct rbs_ast_members_alias {
|
275
|
+
rbs_node_t base;
|
276
|
+
|
277
|
+
struct rbs_ast_symbol *new_name;
|
278
|
+
struct rbs_ast_symbol *old_name;
|
279
|
+
struct rbs_keyword *kind;
|
280
|
+
struct rbs_node_list *annotations;
|
281
|
+
struct rbs_ast_comment *comment;
|
282
|
+
} rbs_ast_members_alias_t;
|
283
|
+
|
284
|
+
typedef struct rbs_ast_members_attr_accessor {
|
285
|
+
rbs_node_t base;
|
286
|
+
|
287
|
+
struct rbs_ast_symbol *name;
|
288
|
+
struct rbs_node *type;
|
289
|
+
struct rbs_node *ivar_name;
|
290
|
+
struct rbs_keyword *kind;
|
291
|
+
struct rbs_node_list *annotations;
|
292
|
+
struct rbs_ast_comment *comment;
|
293
|
+
struct rbs_keyword *visibility;
|
294
|
+
} rbs_ast_members_attr_accessor_t;
|
295
|
+
|
296
|
+
typedef struct rbs_ast_members_attr_reader {
|
297
|
+
rbs_node_t base;
|
298
|
+
|
299
|
+
struct rbs_ast_symbol *name;
|
300
|
+
struct rbs_node *type;
|
301
|
+
struct rbs_node *ivar_name;
|
302
|
+
struct rbs_keyword *kind;
|
303
|
+
struct rbs_node_list *annotations;
|
304
|
+
struct rbs_ast_comment *comment;
|
305
|
+
struct rbs_keyword *visibility;
|
306
|
+
} rbs_ast_members_attr_reader_t;
|
307
|
+
|
308
|
+
typedef struct rbs_ast_members_attr_writer {
|
309
|
+
rbs_node_t base;
|
310
|
+
|
311
|
+
struct rbs_ast_symbol *name;
|
312
|
+
struct rbs_node *type;
|
313
|
+
struct rbs_node *ivar_name;
|
314
|
+
struct rbs_keyword *kind;
|
315
|
+
struct rbs_node_list *annotations;
|
316
|
+
struct rbs_ast_comment *comment;
|
317
|
+
struct rbs_keyword *visibility;
|
318
|
+
} rbs_ast_members_attr_writer_t;
|
319
|
+
|
320
|
+
typedef struct rbs_ast_members_class_instance_variable {
|
321
|
+
rbs_node_t base;
|
322
|
+
|
323
|
+
struct rbs_ast_symbol *name;
|
324
|
+
struct rbs_node *type;
|
325
|
+
struct rbs_ast_comment *comment;
|
326
|
+
} rbs_ast_members_class_instance_variable_t;
|
327
|
+
|
328
|
+
typedef struct rbs_ast_members_class_variable {
|
329
|
+
rbs_node_t base;
|
330
|
+
|
331
|
+
struct rbs_ast_symbol *name;
|
332
|
+
struct rbs_node *type;
|
333
|
+
struct rbs_ast_comment *comment;
|
334
|
+
} rbs_ast_members_class_variable_t;
|
335
|
+
|
336
|
+
typedef struct rbs_ast_members_extend {
|
337
|
+
rbs_node_t base;
|
338
|
+
|
339
|
+
struct rbs_type_name *name;
|
340
|
+
struct rbs_node_list *args;
|
341
|
+
struct rbs_node_list *annotations;
|
342
|
+
struct rbs_ast_comment *comment;
|
343
|
+
} rbs_ast_members_extend_t;
|
344
|
+
|
345
|
+
typedef struct rbs_ast_members_include {
|
346
|
+
rbs_node_t base;
|
347
|
+
|
348
|
+
struct rbs_type_name *name;
|
349
|
+
struct rbs_node_list *args;
|
350
|
+
struct rbs_node_list *annotations;
|
351
|
+
struct rbs_ast_comment *comment;
|
352
|
+
} rbs_ast_members_include_t;
|
353
|
+
|
354
|
+
typedef struct rbs_ast_members_instance_variable {
|
355
|
+
rbs_node_t base;
|
356
|
+
|
357
|
+
struct rbs_ast_symbol *name;
|
358
|
+
struct rbs_node *type;
|
359
|
+
struct rbs_ast_comment *comment;
|
360
|
+
} rbs_ast_members_instance_variable_t;
|
361
|
+
|
362
|
+
typedef struct rbs_ast_members_method_definition {
|
363
|
+
rbs_node_t base;
|
364
|
+
|
365
|
+
struct rbs_ast_symbol *name;
|
366
|
+
struct rbs_keyword *kind;
|
367
|
+
struct rbs_node_list *overloads;
|
368
|
+
struct rbs_node_list *annotations;
|
369
|
+
struct rbs_ast_comment *comment;
|
370
|
+
bool overloading;
|
371
|
+
struct rbs_keyword *visibility;
|
372
|
+
} rbs_ast_members_method_definition_t;
|
373
|
+
|
374
|
+
typedef struct rbs_ast_members_method_definition_overload {
|
375
|
+
rbs_node_t base;
|
376
|
+
|
377
|
+
struct rbs_node_list *annotations;
|
378
|
+
struct rbs_node *method_type;
|
379
|
+
} rbs_ast_members_method_definition_overload_t;
|
380
|
+
|
381
|
+
typedef struct rbs_ast_members_prepend {
|
382
|
+
rbs_node_t base;
|
383
|
+
|
384
|
+
struct rbs_type_name *name;
|
385
|
+
struct rbs_node_list *args;
|
386
|
+
struct rbs_node_list *annotations;
|
387
|
+
struct rbs_ast_comment *comment;
|
388
|
+
} rbs_ast_members_prepend_t;
|
389
|
+
|
390
|
+
typedef struct rbs_ast_members_private {
|
391
|
+
rbs_node_t base;
|
392
|
+
|
393
|
+
} rbs_ast_members_private_t;
|
394
|
+
|
395
|
+
typedef struct rbs_ast_members_public {
|
396
|
+
rbs_node_t base;
|
397
|
+
|
398
|
+
} rbs_ast_members_public_t;
|
399
|
+
|
400
|
+
typedef struct rbs_ast_ruby_annotations_colon_method_type_annotation {
|
401
|
+
rbs_node_t base;
|
402
|
+
|
403
|
+
struct rbs_location *prefix_location;
|
404
|
+
struct rbs_node_list *annotations;
|
405
|
+
struct rbs_node *method_type;
|
406
|
+
} rbs_ast_ruby_annotations_colon_method_type_annotation_t;
|
407
|
+
|
408
|
+
typedef struct rbs_ast_ruby_annotations_method_types_annotation {
|
409
|
+
rbs_node_t base;
|
410
|
+
|
411
|
+
struct rbs_location *prefix_location;
|
412
|
+
struct rbs_node_list *overloads;
|
413
|
+
struct rbs_location_list *vertical_bar_locations;
|
414
|
+
} rbs_ast_ruby_annotations_method_types_annotation_t;
|
415
|
+
|
416
|
+
typedef struct rbs_ast_ruby_annotations_node_type_assertion {
|
417
|
+
rbs_node_t base;
|
418
|
+
|
419
|
+
struct rbs_location *prefix_location;
|
420
|
+
struct rbs_node *type;
|
421
|
+
} rbs_ast_ruby_annotations_node_type_assertion_t;
|
422
|
+
|
423
|
+
typedef struct rbs_ast_ruby_annotations_return_type_annotation {
|
424
|
+
rbs_node_t base;
|
425
|
+
|
426
|
+
struct rbs_location *prefix_location;
|
427
|
+
struct rbs_location *return_location;
|
428
|
+
struct rbs_location *colon_location;
|
429
|
+
struct rbs_node *return_type;
|
430
|
+
struct rbs_location *comment_location;
|
431
|
+
} rbs_ast_ruby_annotations_return_type_annotation_t;
|
432
|
+
|
433
|
+
typedef struct rbs_ast_ruby_annotations_skip_annotation {
|
434
|
+
rbs_node_t base;
|
435
|
+
|
436
|
+
struct rbs_location *prefix_location;
|
437
|
+
struct rbs_location *skip_location;
|
438
|
+
struct rbs_location *comment_location;
|
439
|
+
} rbs_ast_ruby_annotations_skip_annotation_t;
|
440
|
+
|
441
|
+
typedef struct rbs_ast_string {
|
442
|
+
rbs_node_t base;
|
443
|
+
|
444
|
+
rbs_string_t string;
|
445
|
+
} rbs_ast_string_t;
|
446
|
+
|
447
|
+
typedef struct rbs_ast_type_param {
|
448
|
+
rbs_node_t base;
|
449
|
+
|
450
|
+
struct rbs_ast_symbol *name;
|
451
|
+
struct rbs_keyword *variance;
|
452
|
+
struct rbs_node *upper_bound;
|
453
|
+
struct rbs_node *default_type;
|
454
|
+
bool unchecked;
|
455
|
+
} rbs_ast_type_param_t;
|
456
|
+
|
457
|
+
typedef struct rbs_method_type {
|
458
|
+
rbs_node_t base;
|
459
|
+
|
460
|
+
struct rbs_node_list *type_params;
|
461
|
+
struct rbs_node *type;
|
462
|
+
struct rbs_types_block *block;
|
463
|
+
} rbs_method_type_t;
|
464
|
+
|
465
|
+
typedef struct rbs_namespace {
|
466
|
+
rbs_node_t base;
|
467
|
+
|
468
|
+
struct rbs_node_list *path;
|
469
|
+
bool absolute;
|
470
|
+
} rbs_namespace_t;
|
471
|
+
|
472
|
+
typedef struct rbs_signature {
|
473
|
+
rbs_node_t base;
|
474
|
+
|
475
|
+
struct rbs_node_list *directives;
|
476
|
+
struct rbs_node_list *declarations;
|
477
|
+
} rbs_signature_t;
|
478
|
+
|
479
|
+
typedef struct rbs_type_name {
|
480
|
+
rbs_node_t base;
|
481
|
+
|
482
|
+
struct rbs_namespace *rbs_namespace;
|
483
|
+
struct rbs_ast_symbol *name;
|
484
|
+
} rbs_type_name_t;
|
485
|
+
|
486
|
+
typedef struct rbs_types_alias {
|
487
|
+
rbs_node_t base;
|
488
|
+
|
489
|
+
struct rbs_type_name *name;
|
490
|
+
struct rbs_node_list *args;
|
491
|
+
} rbs_types_alias_t;
|
492
|
+
|
493
|
+
typedef struct rbs_types_bases_any {
|
494
|
+
rbs_node_t base;
|
495
|
+
|
496
|
+
bool todo;
|
497
|
+
} rbs_types_bases_any_t;
|
498
|
+
|
499
|
+
typedef struct rbs_types_bases_bool {
|
500
|
+
rbs_node_t base;
|
501
|
+
|
502
|
+
} rbs_types_bases_bool_t;
|
503
|
+
|
504
|
+
typedef struct rbs_types_bases_bottom {
|
505
|
+
rbs_node_t base;
|
506
|
+
|
507
|
+
} rbs_types_bases_bottom_t;
|
508
|
+
|
509
|
+
typedef struct rbs_types_bases_class {
|
510
|
+
rbs_node_t base;
|
511
|
+
|
512
|
+
} rbs_types_bases_class_t;
|
513
|
+
|
514
|
+
typedef struct rbs_types_bases_instance {
|
515
|
+
rbs_node_t base;
|
516
|
+
|
517
|
+
} rbs_types_bases_instance_t;
|
518
|
+
|
519
|
+
typedef struct rbs_types_bases_nil {
|
520
|
+
rbs_node_t base;
|
521
|
+
|
522
|
+
} rbs_types_bases_nil_t;
|
523
|
+
|
524
|
+
typedef struct rbs_types_bases_self {
|
525
|
+
rbs_node_t base;
|
526
|
+
|
527
|
+
} rbs_types_bases_self_t;
|
528
|
+
|
529
|
+
typedef struct rbs_types_bases_top {
|
530
|
+
rbs_node_t base;
|
531
|
+
|
532
|
+
} rbs_types_bases_top_t;
|
533
|
+
|
534
|
+
typedef struct rbs_types_bases_void {
|
535
|
+
rbs_node_t base;
|
536
|
+
|
537
|
+
} rbs_types_bases_void_t;
|
538
|
+
|
539
|
+
typedef struct rbs_types_block {
|
540
|
+
rbs_node_t base;
|
541
|
+
|
542
|
+
struct rbs_node *type;
|
543
|
+
bool required;
|
544
|
+
struct rbs_node *self_type;
|
545
|
+
} rbs_types_block_t;
|
546
|
+
|
547
|
+
typedef struct rbs_types_class_instance {
|
548
|
+
rbs_node_t base;
|
549
|
+
|
550
|
+
struct rbs_type_name *name;
|
551
|
+
struct rbs_node_list *args;
|
552
|
+
} rbs_types_class_instance_t;
|
553
|
+
|
554
|
+
typedef struct rbs_types_class_singleton {
|
555
|
+
rbs_node_t base;
|
556
|
+
|
557
|
+
struct rbs_type_name *name;
|
558
|
+
} rbs_types_class_singleton_t;
|
559
|
+
|
560
|
+
typedef struct rbs_types_function {
|
561
|
+
rbs_node_t base;
|
562
|
+
|
563
|
+
struct rbs_node_list *required_positionals;
|
564
|
+
struct rbs_node_list *optional_positionals;
|
565
|
+
struct rbs_node *rest_positionals;
|
566
|
+
struct rbs_node_list *trailing_positionals;
|
567
|
+
struct rbs_hash *required_keywords;
|
568
|
+
struct rbs_hash *optional_keywords;
|
569
|
+
struct rbs_node *rest_keywords;
|
570
|
+
struct rbs_node *return_type;
|
571
|
+
} rbs_types_function_t;
|
572
|
+
|
573
|
+
typedef struct rbs_types_function_param {
|
574
|
+
rbs_node_t base;
|
575
|
+
|
576
|
+
struct rbs_node *type;
|
577
|
+
struct rbs_ast_symbol *name;
|
578
|
+
} rbs_types_function_param_t;
|
579
|
+
|
580
|
+
typedef struct rbs_types_interface {
|
581
|
+
rbs_node_t base;
|
582
|
+
|
583
|
+
struct rbs_type_name *name;
|
584
|
+
struct rbs_node_list *args;
|
585
|
+
} rbs_types_interface_t;
|
586
|
+
|
587
|
+
typedef struct rbs_types_intersection {
|
588
|
+
rbs_node_t base;
|
589
|
+
|
590
|
+
struct rbs_node_list *types;
|
591
|
+
} rbs_types_intersection_t;
|
592
|
+
|
593
|
+
typedef struct rbs_types_literal {
|
594
|
+
rbs_node_t base;
|
595
|
+
|
596
|
+
struct rbs_node *literal;
|
597
|
+
} rbs_types_literal_t;
|
598
|
+
|
599
|
+
typedef struct rbs_types_optional {
|
600
|
+
rbs_node_t base;
|
601
|
+
|
602
|
+
struct rbs_node *type;
|
603
|
+
} rbs_types_optional_t;
|
604
|
+
|
605
|
+
typedef struct rbs_types_proc {
|
606
|
+
rbs_node_t base;
|
607
|
+
|
608
|
+
struct rbs_node *type;
|
609
|
+
struct rbs_types_block *block;
|
610
|
+
struct rbs_node *self_type;
|
611
|
+
} rbs_types_proc_t;
|
612
|
+
|
613
|
+
typedef struct rbs_types_record {
|
614
|
+
rbs_node_t base;
|
615
|
+
|
616
|
+
struct rbs_hash *all_fields;
|
617
|
+
} rbs_types_record_t;
|
618
|
+
|
619
|
+
typedef struct rbs_types_record_field_type {
|
620
|
+
rbs_node_t base;
|
621
|
+
|
622
|
+
struct rbs_node *type;
|
623
|
+
bool required;
|
624
|
+
} rbs_types_record_field_type_t;
|
625
|
+
|
626
|
+
typedef struct rbs_types_tuple {
|
627
|
+
rbs_node_t base;
|
628
|
+
|
629
|
+
struct rbs_node_list *types;
|
630
|
+
} rbs_types_tuple_t;
|
631
|
+
|
632
|
+
typedef struct rbs_types_union {
|
633
|
+
rbs_node_t base;
|
634
|
+
|
635
|
+
struct rbs_node_list *types;
|
636
|
+
} rbs_types_union_t;
|
637
|
+
|
638
|
+
typedef struct rbs_types_untyped_function {
|
639
|
+
rbs_node_t base;
|
640
|
+
|
641
|
+
struct rbs_node *return_type;
|
642
|
+
} rbs_types_untyped_function_t;
|
643
|
+
|
644
|
+
typedef struct rbs_types_variable {
|
645
|
+
rbs_node_t base;
|
646
|
+
|
647
|
+
struct rbs_ast_symbol *name;
|
648
|
+
} rbs_types_variable_t;
|
649
|
+
|
650
|
+
|
651
|
+
typedef union rbs_ast_ruby_annotations {
|
652
|
+
rbs_node_t base;
|
653
|
+
rbs_ast_ruby_annotations_colon_method_type_annotation_t colon_method_type_annotation;
|
654
|
+
rbs_ast_ruby_annotations_method_types_annotation_t method_types_annotation;
|
655
|
+
rbs_ast_ruby_annotations_node_type_assertion_t node_type_assertion;
|
656
|
+
rbs_ast_ruby_annotations_return_type_annotation_t return_type_annotation;
|
657
|
+
rbs_ast_ruby_annotations_skip_annotation_t skip_annotation;
|
658
|
+
} rbs_ast_ruby_annotations_t;
|
659
|
+
|
660
|
+
/// `rbs_keyword_t` models RBS keywords like "private", "instance", "covariant", etc.
|
661
|
+
/// These are stored in the global constant pool, and get surfaced to Ruby as `Symbol`s,
|
662
|
+
/// just like `rbs_ast_symbol_t`s.
|
663
|
+
typedef struct rbs_keyword {
|
664
|
+
rbs_node_t base;
|
665
|
+
rbs_constant_id_t constant_id;
|
666
|
+
} rbs_keyword_t;
|
667
|
+
|
668
|
+
rbs_keyword_t *rbs_keyword_new(rbs_allocator_t *, rbs_location_t *, rbs_constant_id_t);
|
669
|
+
|
670
|
+
/// `rbs_ast_symbol_t` models user-defined identifiers like class names, method names, etc.
|
671
|
+
/// These get stored in the parser's own constant pool, and get surfaced to Ruby as `Symbol`s.
|
672
|
+
typedef struct rbs_ast_symbol {
|
673
|
+
rbs_node_t base;
|
674
|
+
rbs_constant_id_t constant_id;
|
675
|
+
} rbs_ast_symbol_t;
|
676
|
+
|
677
|
+
rbs_ast_symbol_t *rbs_ast_symbol_new(rbs_allocator_t *, rbs_location_t *, rbs_constant_pool_t *, rbs_constant_id_t);
|
678
|
+
|
679
|
+
rbs_ast_annotation_t *rbs_ast_annotation_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_string_t string);
|
680
|
+
rbs_ast_bool_t *rbs_ast_bool_new(rbs_allocator_t *allocator, rbs_location_t *location, bool value);
|
681
|
+
rbs_ast_comment_t *rbs_ast_comment_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_string_t string);
|
682
|
+
rbs_ast_declarations_class_t *rbs_ast_declarations_class_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name, rbs_node_list_t *type_params, rbs_ast_declarations_class_super_t *super_class, rbs_node_list_t *members, rbs_node_list_t *annotations, rbs_ast_comment_t *comment);
|
683
|
+
rbs_ast_declarations_class_super_t *rbs_ast_declarations_class_super_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name, rbs_node_list_t *args);
|
684
|
+
rbs_ast_declarations_class_alias_t *rbs_ast_declarations_class_alias_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *new_name, rbs_type_name_t *old_name, rbs_ast_comment_t *comment, rbs_node_list_t *annotations);
|
685
|
+
rbs_ast_declarations_constant_t *rbs_ast_declarations_constant_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name, rbs_node_t *type, rbs_ast_comment_t *comment, rbs_node_list_t *annotations);
|
686
|
+
rbs_ast_declarations_global_t *rbs_ast_declarations_global_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_ast_comment_t *comment, rbs_node_list_t *annotations);
|
687
|
+
rbs_ast_declarations_interface_t *rbs_ast_declarations_interface_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name, rbs_node_list_t *type_params, rbs_node_list_t *members, rbs_node_list_t *annotations, rbs_ast_comment_t *comment);
|
688
|
+
rbs_ast_declarations_module_t *rbs_ast_declarations_module_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name, rbs_node_list_t *type_params, rbs_node_list_t *self_types, rbs_node_list_t *members, rbs_node_list_t *annotations, rbs_ast_comment_t *comment);
|
689
|
+
rbs_ast_declarations_module_self_t *rbs_ast_declarations_module_self_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name, rbs_node_list_t *args);
|
690
|
+
rbs_ast_declarations_module_alias_t *rbs_ast_declarations_module_alias_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *new_name, rbs_type_name_t *old_name, rbs_ast_comment_t *comment, rbs_node_list_t *annotations);
|
691
|
+
rbs_ast_declarations_type_alias_t *rbs_ast_declarations_type_alias_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name, rbs_node_list_t *type_params, rbs_node_t *type, rbs_node_list_t *annotations, rbs_ast_comment_t *comment);
|
692
|
+
rbs_ast_directives_use_t *rbs_ast_directives_use_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_list_t *clauses);
|
693
|
+
rbs_ast_directives_use_single_clause_t *rbs_ast_directives_use_single_clause_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *type_name, rbs_ast_symbol_t *new_name);
|
694
|
+
rbs_ast_directives_use_wildcard_clause_t *rbs_ast_directives_use_wildcard_clause_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_namespace_t *rbs_namespace);
|
695
|
+
rbs_ast_integer_t *rbs_ast_integer_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_string_t string_representation);
|
696
|
+
rbs_ast_members_alias_t *rbs_ast_members_alias_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_ast_symbol_t *new_name, rbs_ast_symbol_t *old_name, rbs_keyword_t *kind, rbs_node_list_t *annotations, rbs_ast_comment_t *comment);
|
697
|
+
rbs_ast_members_attr_accessor_t *rbs_ast_members_attr_accessor_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_node_t *ivar_name, rbs_keyword_t *kind, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, rbs_keyword_t *visibility);
|
698
|
+
rbs_ast_members_attr_reader_t *rbs_ast_members_attr_reader_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_node_t *ivar_name, rbs_keyword_t *kind, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, rbs_keyword_t *visibility);
|
699
|
+
rbs_ast_members_attr_writer_t *rbs_ast_members_attr_writer_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_node_t *ivar_name, rbs_keyword_t *kind, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, rbs_keyword_t *visibility);
|
700
|
+
rbs_ast_members_class_instance_variable_t *rbs_ast_members_class_instance_variable_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_ast_comment_t *comment);
|
701
|
+
rbs_ast_members_class_variable_t *rbs_ast_members_class_variable_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_ast_comment_t *comment);
|
702
|
+
rbs_ast_members_extend_t *rbs_ast_members_extend_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name, rbs_node_list_t *args, rbs_node_list_t *annotations, rbs_ast_comment_t *comment);
|
703
|
+
rbs_ast_members_include_t *rbs_ast_members_include_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name, rbs_node_list_t *args, rbs_node_list_t *annotations, rbs_ast_comment_t *comment);
|
704
|
+
rbs_ast_members_instance_variable_t *rbs_ast_members_instance_variable_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_ast_comment_t *comment);
|
705
|
+
rbs_ast_members_method_definition_t *rbs_ast_members_method_definition_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_ast_symbol_t *name, rbs_keyword_t *kind, rbs_node_list_t *overloads, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, bool overloading, rbs_keyword_t *visibility);
|
706
|
+
rbs_ast_members_method_definition_overload_t *rbs_ast_members_method_definition_overload_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_list_t *annotations, rbs_node_t *method_type);
|
707
|
+
rbs_ast_members_prepend_t *rbs_ast_members_prepend_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name, rbs_node_list_t *args, rbs_node_list_t *annotations, rbs_ast_comment_t *comment);
|
708
|
+
rbs_ast_members_private_t *rbs_ast_members_private_new(rbs_allocator_t *allocator, rbs_location_t *location);
|
709
|
+
rbs_ast_members_public_t *rbs_ast_members_public_new(rbs_allocator_t *allocator, rbs_location_t *location);
|
710
|
+
rbs_ast_ruby_annotations_colon_method_type_annotation_t *rbs_ast_ruby_annotations_colon_method_type_annotation_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_location_t *prefix_location, rbs_node_list_t *annotations, rbs_node_t *method_type);
|
711
|
+
rbs_ast_ruby_annotations_method_types_annotation_t *rbs_ast_ruby_annotations_method_types_annotation_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_location_t *prefix_location, rbs_node_list_t *overloads, rbs_location_list_t *vertical_bar_locations);
|
712
|
+
rbs_ast_ruby_annotations_node_type_assertion_t *rbs_ast_ruby_annotations_node_type_assertion_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_location_t *prefix_location, rbs_node_t *type);
|
713
|
+
rbs_ast_ruby_annotations_return_type_annotation_t *rbs_ast_ruby_annotations_return_type_annotation_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_location_t *prefix_location, rbs_location_t *return_location, rbs_location_t *colon_location, rbs_node_t *return_type, rbs_location_t *comment_location);
|
714
|
+
rbs_ast_ruby_annotations_skip_annotation_t *rbs_ast_ruby_annotations_skip_annotation_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_location_t *prefix_location, rbs_location_t *skip_location, rbs_location_t *comment_location);
|
715
|
+
rbs_ast_string_t *rbs_ast_string_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_string_t string);
|
716
|
+
rbs_ast_type_param_t *rbs_ast_type_param_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_ast_symbol_t *name, rbs_keyword_t *variance, rbs_node_t *upper_bound, rbs_node_t *default_type, bool unchecked);
|
717
|
+
rbs_method_type_t *rbs_method_type_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_list_t *type_params, rbs_node_t *type, rbs_types_block_t *block);
|
718
|
+
rbs_namespace_t *rbs_namespace_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_list_t *path, bool absolute);
|
719
|
+
rbs_signature_t *rbs_signature_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_list_t *directives, rbs_node_list_t *declarations);
|
720
|
+
rbs_type_name_t *rbs_type_name_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_namespace_t *rbs_namespace, rbs_ast_symbol_t *name);
|
721
|
+
rbs_types_alias_t *rbs_types_alias_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name, rbs_node_list_t *args);
|
722
|
+
rbs_types_bases_any_t *rbs_types_bases_any_new(rbs_allocator_t *allocator, rbs_location_t *location, bool todo);
|
723
|
+
rbs_types_bases_bool_t *rbs_types_bases_bool_new(rbs_allocator_t *allocator, rbs_location_t *location);
|
724
|
+
rbs_types_bases_bottom_t *rbs_types_bases_bottom_new(rbs_allocator_t *allocator, rbs_location_t *location);
|
725
|
+
rbs_types_bases_class_t *rbs_types_bases_class_new(rbs_allocator_t *allocator, rbs_location_t *location);
|
726
|
+
rbs_types_bases_instance_t *rbs_types_bases_instance_new(rbs_allocator_t *allocator, rbs_location_t *location);
|
727
|
+
rbs_types_bases_nil_t *rbs_types_bases_nil_new(rbs_allocator_t *allocator, rbs_location_t *location);
|
728
|
+
rbs_types_bases_self_t *rbs_types_bases_self_new(rbs_allocator_t *allocator, rbs_location_t *location);
|
729
|
+
rbs_types_bases_top_t *rbs_types_bases_top_new(rbs_allocator_t *allocator, rbs_location_t *location);
|
730
|
+
rbs_types_bases_void_t *rbs_types_bases_void_new(rbs_allocator_t *allocator, rbs_location_t *location);
|
731
|
+
rbs_types_block_t *rbs_types_block_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_t *type, bool required, rbs_node_t *self_type);
|
732
|
+
rbs_types_class_instance_t *rbs_types_class_instance_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name, rbs_node_list_t *args);
|
733
|
+
rbs_types_class_singleton_t *rbs_types_class_singleton_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name);
|
734
|
+
rbs_types_function_t *rbs_types_function_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_list_t *required_positionals, rbs_node_list_t *optional_positionals, rbs_node_t *rest_positionals, rbs_node_list_t *trailing_positionals, rbs_hash_t *required_keywords, rbs_hash_t *optional_keywords, rbs_node_t *rest_keywords, rbs_node_t *return_type);
|
735
|
+
rbs_types_function_param_t *rbs_types_function_param_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_t *type, rbs_ast_symbol_t *name);
|
736
|
+
rbs_types_interface_t *rbs_types_interface_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name, rbs_node_list_t *args);
|
737
|
+
rbs_types_intersection_t *rbs_types_intersection_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_list_t *types);
|
738
|
+
rbs_types_literal_t *rbs_types_literal_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_t *literal);
|
739
|
+
rbs_types_optional_t *rbs_types_optional_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_t *type);
|
740
|
+
rbs_types_proc_t *rbs_types_proc_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_t *type, rbs_types_block_t *block, rbs_node_t *self_type);
|
741
|
+
rbs_types_record_t *rbs_types_record_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_hash_t *all_fields);
|
742
|
+
rbs_types_record_field_type_t *rbs_types_record_field_type_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_t *type, bool required);
|
743
|
+
rbs_types_tuple_t *rbs_types_tuple_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_list_t *types);
|
744
|
+
rbs_types_union_t *rbs_types_union_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_list_t *types);
|
745
|
+
rbs_types_untyped_function_t *rbs_types_untyped_function_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_t *return_type);
|
746
|
+
rbs_types_variable_t *rbs_types_variable_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_ast_symbol_t *name);
|
747
|
+
|
748
|
+
#endif
|