rbs 4.0.0.dev.2 → 4.0.0.dev.3
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/.clang-format +74 -0
- data/.clangd +2 -0
- data/.github/workflows/c-check.yml +51 -0
- data/.github/workflows/dependabot.yml +1 -1
- data/.github/workflows/ruby.yml +0 -17
- data/.github/workflows/typecheck.yml +0 -2
- data/.gitignore +4 -0
- data/.rubocop.yml +1 -1
- data/.vscode/extensions.json +5 -0
- data/.vscode/settings.json +19 -0
- data/README.md +37 -0
- data/Rakefile +82 -0
- data/config.yml +1 -1
- data/core/enumerable.rbs +9 -0
- data/core/io.rbs +4 -4
- data/core/thread.rbs +0 -7
- data/ext/rbs_extension/ast_translation.c +1008 -1074
- data/ext/rbs_extension/class_constants.c +78 -74
- data/ext/rbs_extension/compat.h +3 -3
- data/ext/rbs_extension/extconf.rb +11 -1
- data/ext/rbs_extension/legacy_location.c +173 -172
- data/ext/rbs_extension/legacy_location.h +3 -3
- data/ext/rbs_extension/main.c +315 -273
- data/include/rbs/ast.h +11 -12
- data/include/rbs/defines.h +11 -12
- data/include/rbs/lexer.h +105 -105
- data/include/rbs/location.h +14 -14
- data/include/rbs/parser.h +21 -19
- data/include/rbs/string.h +3 -3
- data/include/rbs/util/rbs_allocator.h +14 -14
- data/include/rbs/util/rbs_constant_pool.h +3 -3
- data/include/rbs/util/rbs_encoding.h +1 -1
- data/lib/rbs/environment.rb +4 -0
- data/lib/rbs/namespace.rb +0 -7
- data/lib/rbs/parser_aux.rb +5 -0
- data/lib/rbs/type_name.rb +0 -7
- data/lib/rbs/types.rb +3 -1
- data/lib/rbs/unit_test/convertibles.rb +1 -0
- data/lib/rbs/version.rb +1 -1
- data/sig/environment.rbs +3 -0
- data/sig/namespace.rbs +0 -5
- data/sig/parser.rbs +20 -0
- data/sig/typename.rbs +0 -5
- data/sig/types.rbs +4 -1
- data/src/ast.c +216 -214
- data/src/lexer.c +2923 -2675
- data/src/lexstate.c +155 -155
- data/src/location.c +40 -40
- data/src/parser.c +2591 -2586
- data/src/string.c +2 -2
- data/src/util/rbs_allocator.c +7 -9
- data/src/util/rbs_assert.c +9 -9
- data/src/util/rbs_constant_pool.c +5 -7
- data/src/util/rbs_encoding.c +20095 -4056
- data/src/util/rbs_unescape.c +33 -32
- data/stdlib/json/0/json.rbs +9 -43
- data/stdlib/ripper/0/ripper.rbs +3 -0
- data/stdlib/socket/0/addrinfo.rbs +2 -2
- metadata +7 -2
data/src/ast.c
CHANGED
@@ -11,84 +11,154 @@
|
|
11
11
|
#include <stdio.h>
|
12
12
|
#include <stdlib.h>
|
13
13
|
|
14
|
-
const char*
|
14
|
+
const char *rbs_node_type_name(rbs_node_t *node) {
|
15
15
|
switch (node->type) {
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
16
|
+
case RBS_AST_ANNOTATION:
|
17
|
+
return "RBS::AST::Annotation";
|
18
|
+
case RBS_AST_BOOL:
|
19
|
+
return "RBS::AST::Bool";
|
20
|
+
case RBS_AST_COMMENT:
|
21
|
+
return "RBS::AST::Comment";
|
22
|
+
case RBS_AST_DECLARATIONS_CLASS:
|
23
|
+
return "RBS::AST::Declarations::Class";
|
24
|
+
case RBS_AST_DECLARATIONS_CLASS_SUPER:
|
25
|
+
return "RBS::AST::Declarations::Class::Super";
|
26
|
+
case RBS_AST_DECLARATIONS_CLASS_ALIAS:
|
27
|
+
return "RBS::AST::Declarations::ClassAlias";
|
28
|
+
case RBS_AST_DECLARATIONS_CONSTANT:
|
29
|
+
return "RBS::AST::Declarations::Constant";
|
30
|
+
case RBS_AST_DECLARATIONS_GLOBAL:
|
31
|
+
return "RBS::AST::Declarations::Global";
|
32
|
+
case RBS_AST_DECLARATIONS_INTERFACE:
|
33
|
+
return "RBS::AST::Declarations::Interface";
|
34
|
+
case RBS_AST_DECLARATIONS_MODULE:
|
35
|
+
return "RBS::AST::Declarations::Module";
|
36
|
+
case RBS_AST_DECLARATIONS_MODULE_SELF:
|
37
|
+
return "RBS::AST::Declarations::Module::Self";
|
38
|
+
case RBS_AST_DECLARATIONS_MODULE_ALIAS:
|
39
|
+
return "RBS::AST::Declarations::ModuleAlias";
|
40
|
+
case RBS_AST_DECLARATIONS_TYPE_ALIAS:
|
41
|
+
return "RBS::AST::Declarations::TypeAlias";
|
42
|
+
case RBS_AST_DIRECTIVES_USE:
|
43
|
+
return "RBS::AST::Directives::Use";
|
44
|
+
case RBS_AST_DIRECTIVES_USE_SINGLE_CLAUSE:
|
45
|
+
return "RBS::AST::Directives::Use::SingleClause";
|
46
|
+
case RBS_AST_DIRECTIVES_USE_WILDCARD_CLAUSE:
|
47
|
+
return "RBS::AST::Directives::Use::WildcardClause";
|
48
|
+
case RBS_AST_INTEGER:
|
49
|
+
return "RBS::AST::Integer";
|
50
|
+
case RBS_AST_MEMBERS_ALIAS:
|
51
|
+
return "RBS::AST::Members::Alias";
|
52
|
+
case RBS_AST_MEMBERS_ATTR_ACCESSOR:
|
53
|
+
return "RBS::AST::Members::AttrAccessor";
|
54
|
+
case RBS_AST_MEMBERS_ATTR_READER:
|
55
|
+
return "RBS::AST::Members::AttrReader";
|
56
|
+
case RBS_AST_MEMBERS_ATTR_WRITER:
|
57
|
+
return "RBS::AST::Members::AttrWriter";
|
58
|
+
case RBS_AST_MEMBERS_CLASS_INSTANCE_VARIABLE:
|
59
|
+
return "RBS::AST::Members::ClassInstanceVariable";
|
60
|
+
case RBS_AST_MEMBERS_CLASS_VARIABLE:
|
61
|
+
return "RBS::AST::Members::ClassVariable";
|
62
|
+
case RBS_AST_MEMBERS_EXTEND:
|
63
|
+
return "RBS::AST::Members::Extend";
|
64
|
+
case RBS_AST_MEMBERS_INCLUDE:
|
65
|
+
return "RBS::AST::Members::Include";
|
66
|
+
case RBS_AST_MEMBERS_INSTANCE_VARIABLE:
|
67
|
+
return "RBS::AST::Members::InstanceVariable";
|
68
|
+
case RBS_AST_MEMBERS_METHOD_DEFINITION:
|
69
|
+
return "RBS::AST::Members::MethodDefinition";
|
70
|
+
case RBS_AST_MEMBERS_METHOD_DEFINITION_OVERLOAD:
|
71
|
+
return "RBS::AST::Members::MethodDefinition::Overload";
|
72
|
+
case RBS_AST_MEMBERS_PREPEND:
|
73
|
+
return "RBS::AST::Members::Prepend";
|
74
|
+
case RBS_AST_MEMBERS_PRIVATE:
|
75
|
+
return "RBS::AST::Members::Private";
|
76
|
+
case RBS_AST_MEMBERS_PUBLIC:
|
77
|
+
return "RBS::AST::Members::Public";
|
78
|
+
case RBS_AST_RUBY_ANNOTATIONS_COLON_METHOD_TYPE_ANNOTATION:
|
79
|
+
return "RBS::AST::Ruby::Annotations::ColonMethodTypeAnnotation";
|
80
|
+
case RBS_AST_RUBY_ANNOTATIONS_METHOD_TYPES_ANNOTATION:
|
81
|
+
return "RBS::AST::Ruby::Annotations::MethodTypesAnnotation";
|
82
|
+
case RBS_AST_RUBY_ANNOTATIONS_NODE_TYPE_ASSERTION:
|
83
|
+
return "RBS::AST::Ruby::Annotations::NodeTypeAssertion";
|
84
|
+
case RBS_AST_RUBY_ANNOTATIONS_RETURN_TYPE_ANNOTATION:
|
85
|
+
return "RBS::AST::Ruby::Annotations::ReturnTypeAnnotation";
|
86
|
+
case RBS_AST_RUBY_ANNOTATIONS_SKIP_ANNOTATION:
|
87
|
+
return "RBS::AST::Ruby::Annotations::SkipAnnotation";
|
88
|
+
case RBS_AST_STRING:
|
89
|
+
return "RBS::AST::String";
|
90
|
+
case RBS_AST_TYPE_PARAM:
|
91
|
+
return "RBS::AST::TypeParam";
|
92
|
+
case RBS_METHOD_TYPE:
|
93
|
+
return "RBS::MethodType";
|
94
|
+
case RBS_NAMESPACE:
|
95
|
+
return "RBS::Namespace";
|
96
|
+
case RBS_SIGNATURE:
|
97
|
+
return "RBS::Signature";
|
98
|
+
case RBS_TYPE_NAME:
|
99
|
+
return "RBS::TypeName";
|
100
|
+
case RBS_TYPES_ALIAS:
|
101
|
+
return "RBS::Types::Alias";
|
102
|
+
case RBS_TYPES_BASES_ANY:
|
103
|
+
return "RBS::Types::Bases::Any";
|
104
|
+
case RBS_TYPES_BASES_BOOL:
|
105
|
+
return "RBS::Types::Bases::Bool";
|
106
|
+
case RBS_TYPES_BASES_BOTTOM:
|
107
|
+
return "RBS::Types::Bases::Bottom";
|
108
|
+
case RBS_TYPES_BASES_CLASS:
|
109
|
+
return "RBS::Types::Bases::Class";
|
110
|
+
case RBS_TYPES_BASES_INSTANCE:
|
111
|
+
return "RBS::Types::Bases::Instance";
|
112
|
+
case RBS_TYPES_BASES_NIL:
|
113
|
+
return "RBS::Types::Bases::Nil";
|
114
|
+
case RBS_TYPES_BASES_SELF:
|
115
|
+
return "RBS::Types::Bases::Self";
|
116
|
+
case RBS_TYPES_BASES_TOP:
|
117
|
+
return "RBS::Types::Bases::Top";
|
118
|
+
case RBS_TYPES_BASES_VOID:
|
119
|
+
return "RBS::Types::Bases::Void";
|
120
|
+
case RBS_TYPES_BLOCK:
|
121
|
+
return "RBS::Types::Block";
|
122
|
+
case RBS_TYPES_CLASS_INSTANCE:
|
123
|
+
return "RBS::Types::ClassInstance";
|
124
|
+
case RBS_TYPES_CLASS_SINGLETON:
|
125
|
+
return "RBS::Types::ClassSingleton";
|
126
|
+
case RBS_TYPES_FUNCTION:
|
127
|
+
return "RBS::Types::Function";
|
128
|
+
case RBS_TYPES_FUNCTION_PARAM:
|
129
|
+
return "RBS::Types::Function::Param";
|
130
|
+
case RBS_TYPES_INTERFACE:
|
131
|
+
return "RBS::Types::Interface";
|
132
|
+
case RBS_TYPES_INTERSECTION:
|
133
|
+
return "RBS::Types::Intersection";
|
134
|
+
case RBS_TYPES_LITERAL:
|
135
|
+
return "RBS::Types::Literal";
|
136
|
+
case RBS_TYPES_OPTIONAL:
|
137
|
+
return "RBS::Types::Optional";
|
138
|
+
case RBS_TYPES_PROC:
|
139
|
+
return "RBS::Types::Proc";
|
140
|
+
case RBS_TYPES_RECORD:
|
141
|
+
return "RBS::Types::Record";
|
142
|
+
case RBS_TYPES_RECORD_FIELD_TYPE:
|
143
|
+
return "RBS::Types::Record::FieldType";
|
144
|
+
case RBS_TYPES_TUPLE:
|
145
|
+
return "RBS::Types::Tuple";
|
146
|
+
case RBS_TYPES_UNION:
|
147
|
+
return "RBS::Types::Union";
|
148
|
+
case RBS_TYPES_UNTYPED_FUNCTION:
|
149
|
+
return "RBS::Types::UntypedFunction";
|
150
|
+
case RBS_TYPES_VARIABLE:
|
151
|
+
return "RBS::Types::Variable";
|
152
|
+
case RBS_AST_SYMBOL:
|
153
|
+
return "Symbol";
|
154
|
+
default:
|
155
|
+
return "Unknown";
|
86
156
|
}
|
87
157
|
}
|
88
158
|
|
89
159
|
/* rbs_node_list */
|
90
160
|
|
91
|
-
rbs_node_list_t*
|
161
|
+
rbs_node_list_t *rbs_node_list_new(rbs_allocator_t *allocator) {
|
92
162
|
rbs_node_list_t *list = rbs_allocator_alloc(allocator, rbs_node_list_t);
|
93
163
|
*list = (rbs_node_list_t) {
|
94
164
|
.allocator = allocator,
|
@@ -120,7 +190,7 @@ void rbs_node_list_append(rbs_node_list_t *list, rbs_node_t *node) {
|
|
120
190
|
|
121
191
|
/* rbs_hash */
|
122
192
|
|
123
|
-
rbs_hash_t*
|
193
|
+
rbs_hash_t *rbs_hash_new(rbs_allocator_t *allocator) {
|
124
194
|
rbs_hash_t *hash = rbs_allocator_alloc(allocator, rbs_hash_t);
|
125
195
|
*hash = (rbs_hash_t) {
|
126
196
|
.allocator = allocator,
|
@@ -138,11 +208,11 @@ bool rbs_node_equal(rbs_node_t *lhs, rbs_node_t *rhs) {
|
|
138
208
|
|
139
209
|
switch (lhs->type) {
|
140
210
|
case RBS_AST_SYMBOL:
|
141
|
-
return ((rbs_ast_symbol_t *)lhs)->constant_id == ((rbs_ast_symbol_t *) rhs)->constant_id;
|
211
|
+
return ((rbs_ast_symbol_t *) lhs)->constant_id == ((rbs_ast_symbol_t *) rhs)->constant_id;
|
142
212
|
case RBS_KEYWORD:
|
143
|
-
return ((rbs_keyword_t *)lhs)->constant_id == ((rbs_keyword_t *) rhs)->constant_id;
|
213
|
+
return ((rbs_keyword_t *) lhs)->constant_id == ((rbs_keyword_t *) rhs)->constant_id;
|
144
214
|
case RBS_AST_BOOL:
|
145
|
-
return ((rbs_ast_bool_t *)lhs)->value == ((rbs_ast_bool_t *) rhs)->value;
|
215
|
+
return ((rbs_ast_bool_t *) lhs)->value == ((rbs_ast_bool_t *) rhs)->value;
|
146
216
|
case RBS_AST_INTEGER:
|
147
217
|
return rbs_string_equal(((rbs_ast_integer_t *) lhs)->string_representation, ((rbs_ast_integer_t *) rhs)->string_representation);
|
148
218
|
case RBS_AST_STRING:
|
@@ -153,7 +223,7 @@ bool rbs_node_equal(rbs_node_t *lhs, rbs_node_t *rhs) {
|
|
153
223
|
}
|
154
224
|
}
|
155
225
|
|
156
|
-
rbs_hash_node_t*
|
226
|
+
rbs_hash_node_t *rbs_hash_find(rbs_hash_t *hash, rbs_node_t *key) {
|
157
227
|
rbs_hash_node_t *current = hash->head;
|
158
228
|
|
159
229
|
while (current != NULL) {
|
@@ -187,7 +257,7 @@ void rbs_hash_set(rbs_hash_t *hash, rbs_node_t *key, rbs_node_t *value) {
|
|
187
257
|
}
|
188
258
|
}
|
189
259
|
|
190
|
-
rbs_node_t*
|
260
|
+
rbs_node_t *rbs_hash_get(rbs_hash_t *hash, rbs_node_t *key) {
|
191
261
|
rbs_hash_node_t *node = rbs_hash_find(hash, key);
|
192
262
|
return node ? node->value : NULL;
|
193
263
|
}
|
@@ -220,11 +290,10 @@ rbs_ast_symbol_t *rbs_ast_symbol_new(rbs_allocator_t *allocator, rbs_location_t
|
|
220
290
|
return instance;
|
221
291
|
}
|
222
292
|
|
223
|
-
#line
|
293
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
224
294
|
rbs_ast_annotation_t *rbs_ast_annotation_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_string_t string) {
|
225
295
|
rbs_ast_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_annotation_t);
|
226
296
|
|
227
|
-
|
228
297
|
*instance = (rbs_ast_annotation_t) {
|
229
298
|
.base = (rbs_node_t) {
|
230
299
|
.type = RBS_AST_ANNOTATION,
|
@@ -235,11 +304,10 @@ rbs_ast_annotation_t *rbs_ast_annotation_new(rbs_allocator_t *allocator, rbs_loc
|
|
235
304
|
|
236
305
|
return instance;
|
237
306
|
}
|
238
|
-
#line
|
307
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
239
308
|
rbs_ast_bool_t *rbs_ast_bool_new(rbs_allocator_t *allocator, rbs_location_t *location, bool value) {
|
240
309
|
rbs_ast_bool_t *instance = rbs_allocator_alloc(allocator, rbs_ast_bool_t);
|
241
310
|
|
242
|
-
|
243
311
|
*instance = (rbs_ast_bool_t) {
|
244
312
|
.base = (rbs_node_t) {
|
245
313
|
.type = RBS_AST_BOOL,
|
@@ -250,11 +318,10 @@ rbs_ast_bool_t *rbs_ast_bool_new(rbs_allocator_t *allocator, rbs_location_t *loc
|
|
250
318
|
|
251
319
|
return instance;
|
252
320
|
}
|
253
|
-
#line
|
321
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
254
322
|
rbs_ast_comment_t *rbs_ast_comment_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_string_t string) {
|
255
323
|
rbs_ast_comment_t *instance = rbs_allocator_alloc(allocator, rbs_ast_comment_t);
|
256
324
|
|
257
|
-
|
258
325
|
*instance = (rbs_ast_comment_t) {
|
259
326
|
.base = (rbs_node_t) {
|
260
327
|
.type = RBS_AST_COMMENT,
|
@@ -265,11 +332,10 @@ rbs_ast_comment_t *rbs_ast_comment_new(rbs_allocator_t *allocator, rbs_location_
|
|
265
332
|
|
266
333
|
return instance;
|
267
334
|
}
|
268
|
-
#line
|
335
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
269
336
|
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) {
|
270
337
|
rbs_ast_declarations_class_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_class_t);
|
271
338
|
|
272
|
-
|
273
339
|
*instance = (rbs_ast_declarations_class_t) {
|
274
340
|
.base = (rbs_node_t) {
|
275
341
|
.type = RBS_AST_DECLARATIONS_CLASS,
|
@@ -285,11 +351,10 @@ rbs_ast_declarations_class_t *rbs_ast_declarations_class_new(rbs_allocator_t *al
|
|
285
351
|
|
286
352
|
return instance;
|
287
353
|
}
|
288
|
-
#line
|
354
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
289
355
|
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) {
|
290
356
|
rbs_ast_declarations_class_super_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_class_super_t);
|
291
357
|
|
292
|
-
|
293
358
|
*instance = (rbs_ast_declarations_class_super_t) {
|
294
359
|
.base = (rbs_node_t) {
|
295
360
|
.type = RBS_AST_DECLARATIONS_CLASS_SUPER,
|
@@ -301,11 +366,10 @@ rbs_ast_declarations_class_super_t *rbs_ast_declarations_class_super_new(rbs_all
|
|
301
366
|
|
302
367
|
return instance;
|
303
368
|
}
|
304
|
-
#line
|
369
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
305
370
|
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) {
|
306
371
|
rbs_ast_declarations_class_alias_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_class_alias_t);
|
307
372
|
|
308
|
-
|
309
373
|
*instance = (rbs_ast_declarations_class_alias_t) {
|
310
374
|
.base = (rbs_node_t) {
|
311
375
|
.type = RBS_AST_DECLARATIONS_CLASS_ALIAS,
|
@@ -319,11 +383,10 @@ rbs_ast_declarations_class_alias_t *rbs_ast_declarations_class_alias_new(rbs_all
|
|
319
383
|
|
320
384
|
return instance;
|
321
385
|
}
|
322
|
-
#line
|
386
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
323
387
|
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) {
|
324
388
|
rbs_ast_declarations_constant_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_constant_t);
|
325
389
|
|
326
|
-
|
327
390
|
*instance = (rbs_ast_declarations_constant_t) {
|
328
391
|
.base = (rbs_node_t) {
|
329
392
|
.type = RBS_AST_DECLARATIONS_CONSTANT,
|
@@ -337,11 +400,10 @@ rbs_ast_declarations_constant_t *rbs_ast_declarations_constant_new(rbs_allocator
|
|
337
400
|
|
338
401
|
return instance;
|
339
402
|
}
|
340
|
-
#line
|
403
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
341
404
|
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) {
|
342
405
|
rbs_ast_declarations_global_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_global_t);
|
343
406
|
|
344
|
-
|
345
407
|
*instance = (rbs_ast_declarations_global_t) {
|
346
408
|
.base = (rbs_node_t) {
|
347
409
|
.type = RBS_AST_DECLARATIONS_GLOBAL,
|
@@ -355,11 +417,10 @@ rbs_ast_declarations_global_t *rbs_ast_declarations_global_new(rbs_allocator_t *
|
|
355
417
|
|
356
418
|
return instance;
|
357
419
|
}
|
358
|
-
#line
|
420
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
359
421
|
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) {
|
360
422
|
rbs_ast_declarations_interface_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_interface_t);
|
361
423
|
|
362
|
-
|
363
424
|
*instance = (rbs_ast_declarations_interface_t) {
|
364
425
|
.base = (rbs_node_t) {
|
365
426
|
.type = RBS_AST_DECLARATIONS_INTERFACE,
|
@@ -374,11 +435,10 @@ rbs_ast_declarations_interface_t *rbs_ast_declarations_interface_new(rbs_allocat
|
|
374
435
|
|
375
436
|
return instance;
|
376
437
|
}
|
377
|
-
#line
|
438
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
378
439
|
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) {
|
379
440
|
rbs_ast_declarations_module_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_module_t);
|
380
441
|
|
381
|
-
|
382
442
|
*instance = (rbs_ast_declarations_module_t) {
|
383
443
|
.base = (rbs_node_t) {
|
384
444
|
.type = RBS_AST_DECLARATIONS_MODULE,
|
@@ -394,11 +454,10 @@ rbs_ast_declarations_module_t *rbs_ast_declarations_module_new(rbs_allocator_t *
|
|
394
454
|
|
395
455
|
return instance;
|
396
456
|
}
|
397
|
-
#line
|
457
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
398
458
|
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) {
|
399
459
|
rbs_ast_declarations_module_self_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_module_self_t);
|
400
460
|
|
401
|
-
|
402
461
|
*instance = (rbs_ast_declarations_module_self_t) {
|
403
462
|
.base = (rbs_node_t) {
|
404
463
|
.type = RBS_AST_DECLARATIONS_MODULE_SELF,
|
@@ -410,11 +469,10 @@ rbs_ast_declarations_module_self_t *rbs_ast_declarations_module_self_new(rbs_all
|
|
410
469
|
|
411
470
|
return instance;
|
412
471
|
}
|
413
|
-
#line
|
472
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
414
473
|
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) {
|
415
474
|
rbs_ast_declarations_module_alias_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_module_alias_t);
|
416
475
|
|
417
|
-
|
418
476
|
*instance = (rbs_ast_declarations_module_alias_t) {
|
419
477
|
.base = (rbs_node_t) {
|
420
478
|
.type = RBS_AST_DECLARATIONS_MODULE_ALIAS,
|
@@ -428,11 +486,10 @@ rbs_ast_declarations_module_alias_t *rbs_ast_declarations_module_alias_new(rbs_a
|
|
428
486
|
|
429
487
|
return instance;
|
430
488
|
}
|
431
|
-
#line
|
489
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
432
490
|
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) {
|
433
491
|
rbs_ast_declarations_type_alias_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_type_alias_t);
|
434
492
|
|
435
|
-
|
436
493
|
*instance = (rbs_ast_declarations_type_alias_t) {
|
437
494
|
.base = (rbs_node_t) {
|
438
495
|
.type = RBS_AST_DECLARATIONS_TYPE_ALIAS,
|
@@ -447,11 +504,10 @@ rbs_ast_declarations_type_alias_t *rbs_ast_declarations_type_alias_new(rbs_alloc
|
|
447
504
|
|
448
505
|
return instance;
|
449
506
|
}
|
450
|
-
#line
|
507
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
451
508
|
rbs_ast_directives_use_t *rbs_ast_directives_use_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_list_t *clauses) {
|
452
509
|
rbs_ast_directives_use_t *instance = rbs_allocator_alloc(allocator, rbs_ast_directives_use_t);
|
453
510
|
|
454
|
-
|
455
511
|
*instance = (rbs_ast_directives_use_t) {
|
456
512
|
.base = (rbs_node_t) {
|
457
513
|
.type = RBS_AST_DIRECTIVES_USE,
|
@@ -462,11 +518,10 @@ rbs_ast_directives_use_t *rbs_ast_directives_use_new(rbs_allocator_t *allocator,
|
|
462
518
|
|
463
519
|
return instance;
|
464
520
|
}
|
465
|
-
#line
|
521
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
466
522
|
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) {
|
467
523
|
rbs_ast_directives_use_single_clause_t *instance = rbs_allocator_alloc(allocator, rbs_ast_directives_use_single_clause_t);
|
468
524
|
|
469
|
-
|
470
525
|
*instance = (rbs_ast_directives_use_single_clause_t) {
|
471
526
|
.base = (rbs_node_t) {
|
472
527
|
.type = RBS_AST_DIRECTIVES_USE_SINGLE_CLAUSE,
|
@@ -478,11 +533,10 @@ rbs_ast_directives_use_single_clause_t *rbs_ast_directives_use_single_clause_new
|
|
478
533
|
|
479
534
|
return instance;
|
480
535
|
}
|
481
|
-
#line
|
536
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
482
537
|
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) {
|
483
538
|
rbs_ast_directives_use_wildcard_clause_t *instance = rbs_allocator_alloc(allocator, rbs_ast_directives_use_wildcard_clause_t);
|
484
539
|
|
485
|
-
|
486
540
|
*instance = (rbs_ast_directives_use_wildcard_clause_t) {
|
487
541
|
.base = (rbs_node_t) {
|
488
542
|
.type = RBS_AST_DIRECTIVES_USE_WILDCARD_CLAUSE,
|
@@ -493,11 +547,10 @@ rbs_ast_directives_use_wildcard_clause_t *rbs_ast_directives_use_wildcard_clause
|
|
493
547
|
|
494
548
|
return instance;
|
495
549
|
}
|
496
|
-
#line
|
550
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
497
551
|
rbs_ast_integer_t *rbs_ast_integer_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_string_t string_representation) {
|
498
552
|
rbs_ast_integer_t *instance = rbs_allocator_alloc(allocator, rbs_ast_integer_t);
|
499
553
|
|
500
|
-
|
501
554
|
*instance = (rbs_ast_integer_t) {
|
502
555
|
.base = (rbs_node_t) {
|
503
556
|
.type = RBS_AST_INTEGER,
|
@@ -508,11 +561,10 @@ rbs_ast_integer_t *rbs_ast_integer_new(rbs_allocator_t *allocator, rbs_location_
|
|
508
561
|
|
509
562
|
return instance;
|
510
563
|
}
|
511
|
-
#line
|
564
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
512
565
|
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) {
|
513
566
|
rbs_ast_members_alias_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_alias_t);
|
514
567
|
|
515
|
-
|
516
568
|
*instance = (rbs_ast_members_alias_t) {
|
517
569
|
.base = (rbs_node_t) {
|
518
570
|
.type = RBS_AST_MEMBERS_ALIAS,
|
@@ -527,11 +579,10 @@ rbs_ast_members_alias_t *rbs_ast_members_alias_new(rbs_allocator_t *allocator, r
|
|
527
579
|
|
528
580
|
return instance;
|
529
581
|
}
|
530
|
-
#line
|
582
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
531
583
|
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) {
|
532
584
|
rbs_ast_members_attr_accessor_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_attr_accessor_t);
|
533
585
|
|
534
|
-
|
535
586
|
*instance = (rbs_ast_members_attr_accessor_t) {
|
536
587
|
.base = (rbs_node_t) {
|
537
588
|
.type = RBS_AST_MEMBERS_ATTR_ACCESSOR,
|
@@ -548,11 +599,10 @@ rbs_ast_members_attr_accessor_t *rbs_ast_members_attr_accessor_new(rbs_allocator
|
|
548
599
|
|
549
600
|
return instance;
|
550
601
|
}
|
551
|
-
#line
|
602
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
552
603
|
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) {
|
553
604
|
rbs_ast_members_attr_reader_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_attr_reader_t);
|
554
605
|
|
555
|
-
|
556
606
|
*instance = (rbs_ast_members_attr_reader_t) {
|
557
607
|
.base = (rbs_node_t) {
|
558
608
|
.type = RBS_AST_MEMBERS_ATTR_READER,
|
@@ -569,11 +619,10 @@ rbs_ast_members_attr_reader_t *rbs_ast_members_attr_reader_new(rbs_allocator_t *
|
|
569
619
|
|
570
620
|
return instance;
|
571
621
|
}
|
572
|
-
#line
|
622
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
573
623
|
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) {
|
574
624
|
rbs_ast_members_attr_writer_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_attr_writer_t);
|
575
625
|
|
576
|
-
|
577
626
|
*instance = (rbs_ast_members_attr_writer_t) {
|
578
627
|
.base = (rbs_node_t) {
|
579
628
|
.type = RBS_AST_MEMBERS_ATTR_WRITER,
|
@@ -590,11 +639,10 @@ rbs_ast_members_attr_writer_t *rbs_ast_members_attr_writer_new(rbs_allocator_t *
|
|
590
639
|
|
591
640
|
return instance;
|
592
641
|
}
|
593
|
-
#line
|
642
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
594
643
|
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) {
|
595
644
|
rbs_ast_members_class_instance_variable_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_class_instance_variable_t);
|
596
645
|
|
597
|
-
|
598
646
|
*instance = (rbs_ast_members_class_instance_variable_t) {
|
599
647
|
.base = (rbs_node_t) {
|
600
648
|
.type = RBS_AST_MEMBERS_CLASS_INSTANCE_VARIABLE,
|
@@ -607,11 +655,10 @@ rbs_ast_members_class_instance_variable_t *rbs_ast_members_class_instance_variab
|
|
607
655
|
|
608
656
|
return instance;
|
609
657
|
}
|
610
|
-
#line
|
658
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
611
659
|
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) {
|
612
660
|
rbs_ast_members_class_variable_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_class_variable_t);
|
613
661
|
|
614
|
-
|
615
662
|
*instance = (rbs_ast_members_class_variable_t) {
|
616
663
|
.base = (rbs_node_t) {
|
617
664
|
.type = RBS_AST_MEMBERS_CLASS_VARIABLE,
|
@@ -624,11 +671,10 @@ rbs_ast_members_class_variable_t *rbs_ast_members_class_variable_new(rbs_allocat
|
|
624
671
|
|
625
672
|
return instance;
|
626
673
|
}
|
627
|
-
#line
|
674
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
628
675
|
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) {
|
629
676
|
rbs_ast_members_extend_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_extend_t);
|
630
677
|
|
631
|
-
|
632
678
|
*instance = (rbs_ast_members_extend_t) {
|
633
679
|
.base = (rbs_node_t) {
|
634
680
|
.type = RBS_AST_MEMBERS_EXTEND,
|
@@ -642,11 +688,10 @@ rbs_ast_members_extend_t *rbs_ast_members_extend_new(rbs_allocator_t *allocator,
|
|
642
688
|
|
643
689
|
return instance;
|
644
690
|
}
|
645
|
-
#line
|
691
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
646
692
|
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) {
|
647
693
|
rbs_ast_members_include_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_include_t);
|
648
694
|
|
649
|
-
|
650
695
|
*instance = (rbs_ast_members_include_t) {
|
651
696
|
.base = (rbs_node_t) {
|
652
697
|
.type = RBS_AST_MEMBERS_INCLUDE,
|
@@ -660,11 +705,10 @@ rbs_ast_members_include_t *rbs_ast_members_include_new(rbs_allocator_t *allocato
|
|
660
705
|
|
661
706
|
return instance;
|
662
707
|
}
|
663
|
-
#line
|
708
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
664
709
|
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) {
|
665
710
|
rbs_ast_members_instance_variable_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_instance_variable_t);
|
666
711
|
|
667
|
-
|
668
712
|
*instance = (rbs_ast_members_instance_variable_t) {
|
669
713
|
.base = (rbs_node_t) {
|
670
714
|
.type = RBS_AST_MEMBERS_INSTANCE_VARIABLE,
|
@@ -677,11 +721,10 @@ rbs_ast_members_instance_variable_t *rbs_ast_members_instance_variable_new(rbs_a
|
|
677
721
|
|
678
722
|
return instance;
|
679
723
|
}
|
680
|
-
#line
|
724
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
681
725
|
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) {
|
682
726
|
rbs_ast_members_method_definition_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_method_definition_t);
|
683
727
|
|
684
|
-
|
685
728
|
*instance = (rbs_ast_members_method_definition_t) {
|
686
729
|
.base = (rbs_node_t) {
|
687
730
|
.type = RBS_AST_MEMBERS_METHOD_DEFINITION,
|
@@ -698,11 +741,10 @@ rbs_ast_members_method_definition_t *rbs_ast_members_method_definition_new(rbs_a
|
|
698
741
|
|
699
742
|
return instance;
|
700
743
|
}
|
701
|
-
#line
|
744
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
702
745
|
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) {
|
703
746
|
rbs_ast_members_method_definition_overload_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_method_definition_overload_t);
|
704
747
|
|
705
|
-
|
706
748
|
*instance = (rbs_ast_members_method_definition_overload_t) {
|
707
749
|
.base = (rbs_node_t) {
|
708
750
|
.type = RBS_AST_MEMBERS_METHOD_DEFINITION_OVERLOAD,
|
@@ -714,11 +756,10 @@ rbs_ast_members_method_definition_overload_t *rbs_ast_members_method_definition_
|
|
714
756
|
|
715
757
|
return instance;
|
716
758
|
}
|
717
|
-
#line
|
759
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
718
760
|
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) {
|
719
761
|
rbs_ast_members_prepend_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_prepend_t);
|
720
762
|
|
721
|
-
|
722
763
|
*instance = (rbs_ast_members_prepend_t) {
|
723
764
|
.base = (rbs_node_t) {
|
724
765
|
.type = RBS_AST_MEMBERS_PREPEND,
|
@@ -732,11 +773,10 @@ rbs_ast_members_prepend_t *rbs_ast_members_prepend_new(rbs_allocator_t *allocato
|
|
732
773
|
|
733
774
|
return instance;
|
734
775
|
}
|
735
|
-
#line
|
776
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
736
777
|
rbs_ast_members_private_t *rbs_ast_members_private_new(rbs_allocator_t *allocator, rbs_location_t *location) {
|
737
778
|
rbs_ast_members_private_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_private_t);
|
738
779
|
|
739
|
-
|
740
780
|
*instance = (rbs_ast_members_private_t) {
|
741
781
|
.base = (rbs_node_t) {
|
742
782
|
.type = RBS_AST_MEMBERS_PRIVATE,
|
@@ -746,11 +786,10 @@ rbs_ast_members_private_t *rbs_ast_members_private_new(rbs_allocator_t *allocato
|
|
746
786
|
|
747
787
|
return instance;
|
748
788
|
}
|
749
|
-
#line
|
789
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
750
790
|
rbs_ast_members_public_t *rbs_ast_members_public_new(rbs_allocator_t *allocator, rbs_location_t *location) {
|
751
791
|
rbs_ast_members_public_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_public_t);
|
752
792
|
|
753
|
-
|
754
793
|
*instance = (rbs_ast_members_public_t) {
|
755
794
|
.base = (rbs_node_t) {
|
756
795
|
.type = RBS_AST_MEMBERS_PUBLIC,
|
@@ -760,11 +799,10 @@ rbs_ast_members_public_t *rbs_ast_members_public_new(rbs_allocator_t *allocator,
|
|
760
799
|
|
761
800
|
return instance;
|
762
801
|
}
|
763
|
-
#line
|
802
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
764
803
|
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) {
|
765
804
|
rbs_ast_ruby_annotations_colon_method_type_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_colon_method_type_annotation_t);
|
766
805
|
|
767
|
-
|
768
806
|
*instance = (rbs_ast_ruby_annotations_colon_method_type_annotation_t) {
|
769
807
|
.base = (rbs_node_t) {
|
770
808
|
.type = RBS_AST_RUBY_ANNOTATIONS_COLON_METHOD_TYPE_ANNOTATION,
|
@@ -777,11 +815,10 @@ rbs_ast_ruby_annotations_colon_method_type_annotation_t *rbs_ast_ruby_annotation
|
|
777
815
|
|
778
816
|
return instance;
|
779
817
|
}
|
780
|
-
#line
|
818
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
781
819
|
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) {
|
782
820
|
rbs_ast_ruby_annotations_method_types_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_method_types_annotation_t);
|
783
821
|
|
784
|
-
|
785
822
|
*instance = (rbs_ast_ruby_annotations_method_types_annotation_t) {
|
786
823
|
.base = (rbs_node_t) {
|
787
824
|
.type = RBS_AST_RUBY_ANNOTATIONS_METHOD_TYPES_ANNOTATION,
|
@@ -794,11 +831,10 @@ rbs_ast_ruby_annotations_method_types_annotation_t *rbs_ast_ruby_annotations_met
|
|
794
831
|
|
795
832
|
return instance;
|
796
833
|
}
|
797
|
-
#line
|
834
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
798
835
|
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) {
|
799
836
|
rbs_ast_ruby_annotations_node_type_assertion_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_node_type_assertion_t);
|
800
837
|
|
801
|
-
|
802
838
|
*instance = (rbs_ast_ruby_annotations_node_type_assertion_t) {
|
803
839
|
.base = (rbs_node_t) {
|
804
840
|
.type = RBS_AST_RUBY_ANNOTATIONS_NODE_TYPE_ASSERTION,
|
@@ -810,11 +846,10 @@ rbs_ast_ruby_annotations_node_type_assertion_t *rbs_ast_ruby_annotations_node_ty
|
|
810
846
|
|
811
847
|
return instance;
|
812
848
|
}
|
813
|
-
#line
|
849
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
814
850
|
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) {
|
815
851
|
rbs_ast_ruby_annotations_return_type_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_return_type_annotation_t);
|
816
852
|
|
817
|
-
|
818
853
|
*instance = (rbs_ast_ruby_annotations_return_type_annotation_t) {
|
819
854
|
.base = (rbs_node_t) {
|
820
855
|
.type = RBS_AST_RUBY_ANNOTATIONS_RETURN_TYPE_ANNOTATION,
|
@@ -829,11 +864,10 @@ rbs_ast_ruby_annotations_return_type_annotation_t *rbs_ast_ruby_annotations_retu
|
|
829
864
|
|
830
865
|
return instance;
|
831
866
|
}
|
832
|
-
#line
|
867
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
833
868
|
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) {
|
834
869
|
rbs_ast_ruby_annotations_skip_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_skip_annotation_t);
|
835
870
|
|
836
|
-
|
837
871
|
*instance = (rbs_ast_ruby_annotations_skip_annotation_t) {
|
838
872
|
.base = (rbs_node_t) {
|
839
873
|
.type = RBS_AST_RUBY_ANNOTATIONS_SKIP_ANNOTATION,
|
@@ -846,11 +880,10 @@ rbs_ast_ruby_annotations_skip_annotation_t *rbs_ast_ruby_annotations_skip_annota
|
|
846
880
|
|
847
881
|
return instance;
|
848
882
|
}
|
849
|
-
#line
|
883
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
850
884
|
rbs_ast_string_t *rbs_ast_string_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_string_t string) {
|
851
885
|
rbs_ast_string_t *instance = rbs_allocator_alloc(allocator, rbs_ast_string_t);
|
852
886
|
|
853
|
-
|
854
887
|
*instance = (rbs_ast_string_t) {
|
855
888
|
.base = (rbs_node_t) {
|
856
889
|
.type = RBS_AST_STRING,
|
@@ -861,11 +894,10 @@ rbs_ast_string_t *rbs_ast_string_new(rbs_allocator_t *allocator, rbs_location_t
|
|
861
894
|
|
862
895
|
return instance;
|
863
896
|
}
|
864
|
-
#line
|
897
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
865
898
|
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) {
|
866
899
|
rbs_ast_type_param_t *instance = rbs_allocator_alloc(allocator, rbs_ast_type_param_t);
|
867
900
|
|
868
|
-
|
869
901
|
*instance = (rbs_ast_type_param_t) {
|
870
902
|
.base = (rbs_node_t) {
|
871
903
|
.type = RBS_AST_TYPE_PARAM,
|
@@ -880,11 +912,10 @@ rbs_ast_type_param_t *rbs_ast_type_param_new(rbs_allocator_t *allocator, rbs_loc
|
|
880
912
|
|
881
913
|
return instance;
|
882
914
|
}
|
883
|
-
#line
|
915
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
884
916
|
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) {
|
885
917
|
rbs_method_type_t *instance = rbs_allocator_alloc(allocator, rbs_method_type_t);
|
886
918
|
|
887
|
-
|
888
919
|
*instance = (rbs_method_type_t) {
|
889
920
|
.base = (rbs_node_t) {
|
890
921
|
.type = RBS_METHOD_TYPE,
|
@@ -897,11 +928,10 @@ rbs_method_type_t *rbs_method_type_new(rbs_allocator_t *allocator, rbs_location_
|
|
897
928
|
|
898
929
|
return instance;
|
899
930
|
}
|
900
|
-
#line
|
931
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
901
932
|
rbs_namespace_t *rbs_namespace_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_list_t *path, bool absolute) {
|
902
933
|
rbs_namespace_t *instance = rbs_allocator_alloc(allocator, rbs_namespace_t);
|
903
934
|
|
904
|
-
|
905
935
|
*instance = (rbs_namespace_t) {
|
906
936
|
.base = (rbs_node_t) {
|
907
937
|
.type = RBS_NAMESPACE,
|
@@ -913,11 +943,10 @@ rbs_namespace_t *rbs_namespace_new(rbs_allocator_t *allocator, rbs_location_t *l
|
|
913
943
|
|
914
944
|
return instance;
|
915
945
|
}
|
916
|
-
#line
|
946
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
917
947
|
rbs_signature_t *rbs_signature_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_list_t *directives, rbs_node_list_t *declarations) {
|
918
948
|
rbs_signature_t *instance = rbs_allocator_alloc(allocator, rbs_signature_t);
|
919
949
|
|
920
|
-
|
921
950
|
*instance = (rbs_signature_t) {
|
922
951
|
.base = (rbs_node_t) {
|
923
952
|
.type = RBS_SIGNATURE,
|
@@ -929,11 +958,10 @@ rbs_signature_t *rbs_signature_new(rbs_allocator_t *allocator, rbs_location_t *l
|
|
929
958
|
|
930
959
|
return instance;
|
931
960
|
}
|
932
|
-
#line
|
961
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
933
962
|
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) {
|
934
963
|
rbs_type_name_t *instance = rbs_allocator_alloc(allocator, rbs_type_name_t);
|
935
964
|
|
936
|
-
|
937
965
|
*instance = (rbs_type_name_t) {
|
938
966
|
.base = (rbs_node_t) {
|
939
967
|
.type = RBS_TYPE_NAME,
|
@@ -945,11 +973,10 @@ rbs_type_name_t *rbs_type_name_new(rbs_allocator_t *allocator, rbs_location_t *l
|
|
945
973
|
|
946
974
|
return instance;
|
947
975
|
}
|
948
|
-
#line
|
976
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
949
977
|
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) {
|
950
978
|
rbs_types_alias_t *instance = rbs_allocator_alloc(allocator, rbs_types_alias_t);
|
951
979
|
|
952
|
-
|
953
980
|
*instance = (rbs_types_alias_t) {
|
954
981
|
.base = (rbs_node_t) {
|
955
982
|
.type = RBS_TYPES_ALIAS,
|
@@ -961,11 +988,10 @@ rbs_types_alias_t *rbs_types_alias_new(rbs_allocator_t *allocator, rbs_location_
|
|
961
988
|
|
962
989
|
return instance;
|
963
990
|
}
|
964
|
-
#line
|
991
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
965
992
|
rbs_types_bases_any_t *rbs_types_bases_any_new(rbs_allocator_t *allocator, rbs_location_t *location, bool todo) {
|
966
993
|
rbs_types_bases_any_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_any_t);
|
967
994
|
|
968
|
-
|
969
995
|
*instance = (rbs_types_bases_any_t) {
|
970
996
|
.base = (rbs_node_t) {
|
971
997
|
.type = RBS_TYPES_BASES_ANY,
|
@@ -976,11 +1002,10 @@ rbs_types_bases_any_t *rbs_types_bases_any_new(rbs_allocator_t *allocator, rbs_l
|
|
976
1002
|
|
977
1003
|
return instance;
|
978
1004
|
}
|
979
|
-
#line
|
1005
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
980
1006
|
rbs_types_bases_bool_t *rbs_types_bases_bool_new(rbs_allocator_t *allocator, rbs_location_t *location) {
|
981
1007
|
rbs_types_bases_bool_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_bool_t);
|
982
1008
|
|
983
|
-
|
984
1009
|
*instance = (rbs_types_bases_bool_t) {
|
985
1010
|
.base = (rbs_node_t) {
|
986
1011
|
.type = RBS_TYPES_BASES_BOOL,
|
@@ -990,11 +1015,10 @@ rbs_types_bases_bool_t *rbs_types_bases_bool_new(rbs_allocator_t *allocator, rbs
|
|
990
1015
|
|
991
1016
|
return instance;
|
992
1017
|
}
|
993
|
-
#line
|
1018
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
994
1019
|
rbs_types_bases_bottom_t *rbs_types_bases_bottom_new(rbs_allocator_t *allocator, rbs_location_t *location) {
|
995
1020
|
rbs_types_bases_bottom_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_bottom_t);
|
996
1021
|
|
997
|
-
|
998
1022
|
*instance = (rbs_types_bases_bottom_t) {
|
999
1023
|
.base = (rbs_node_t) {
|
1000
1024
|
.type = RBS_TYPES_BASES_BOTTOM,
|
@@ -1004,11 +1028,10 @@ rbs_types_bases_bottom_t *rbs_types_bases_bottom_new(rbs_allocator_t *allocator,
|
|
1004
1028
|
|
1005
1029
|
return instance;
|
1006
1030
|
}
|
1007
|
-
#line
|
1031
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
1008
1032
|
rbs_types_bases_class_t *rbs_types_bases_class_new(rbs_allocator_t *allocator, rbs_location_t *location) {
|
1009
1033
|
rbs_types_bases_class_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_class_t);
|
1010
1034
|
|
1011
|
-
|
1012
1035
|
*instance = (rbs_types_bases_class_t) {
|
1013
1036
|
.base = (rbs_node_t) {
|
1014
1037
|
.type = RBS_TYPES_BASES_CLASS,
|
@@ -1018,11 +1041,10 @@ rbs_types_bases_class_t *rbs_types_bases_class_new(rbs_allocator_t *allocator, r
|
|
1018
1041
|
|
1019
1042
|
return instance;
|
1020
1043
|
}
|
1021
|
-
#line
|
1044
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
1022
1045
|
rbs_types_bases_instance_t *rbs_types_bases_instance_new(rbs_allocator_t *allocator, rbs_location_t *location) {
|
1023
1046
|
rbs_types_bases_instance_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_instance_t);
|
1024
1047
|
|
1025
|
-
|
1026
1048
|
*instance = (rbs_types_bases_instance_t) {
|
1027
1049
|
.base = (rbs_node_t) {
|
1028
1050
|
.type = RBS_TYPES_BASES_INSTANCE,
|
@@ -1032,11 +1054,10 @@ rbs_types_bases_instance_t *rbs_types_bases_instance_new(rbs_allocator_t *alloca
|
|
1032
1054
|
|
1033
1055
|
return instance;
|
1034
1056
|
}
|
1035
|
-
#line
|
1057
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
1036
1058
|
rbs_types_bases_nil_t *rbs_types_bases_nil_new(rbs_allocator_t *allocator, rbs_location_t *location) {
|
1037
1059
|
rbs_types_bases_nil_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_nil_t);
|
1038
1060
|
|
1039
|
-
|
1040
1061
|
*instance = (rbs_types_bases_nil_t) {
|
1041
1062
|
.base = (rbs_node_t) {
|
1042
1063
|
.type = RBS_TYPES_BASES_NIL,
|
@@ -1046,11 +1067,10 @@ rbs_types_bases_nil_t *rbs_types_bases_nil_new(rbs_allocator_t *allocator, rbs_l
|
|
1046
1067
|
|
1047
1068
|
return instance;
|
1048
1069
|
}
|
1049
|
-
#line
|
1070
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
1050
1071
|
rbs_types_bases_self_t *rbs_types_bases_self_new(rbs_allocator_t *allocator, rbs_location_t *location) {
|
1051
1072
|
rbs_types_bases_self_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_self_t);
|
1052
1073
|
|
1053
|
-
|
1054
1074
|
*instance = (rbs_types_bases_self_t) {
|
1055
1075
|
.base = (rbs_node_t) {
|
1056
1076
|
.type = RBS_TYPES_BASES_SELF,
|
@@ -1060,11 +1080,10 @@ rbs_types_bases_self_t *rbs_types_bases_self_new(rbs_allocator_t *allocator, rbs
|
|
1060
1080
|
|
1061
1081
|
return instance;
|
1062
1082
|
}
|
1063
|
-
#line
|
1083
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
1064
1084
|
rbs_types_bases_top_t *rbs_types_bases_top_new(rbs_allocator_t *allocator, rbs_location_t *location) {
|
1065
1085
|
rbs_types_bases_top_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_top_t);
|
1066
1086
|
|
1067
|
-
|
1068
1087
|
*instance = (rbs_types_bases_top_t) {
|
1069
1088
|
.base = (rbs_node_t) {
|
1070
1089
|
.type = RBS_TYPES_BASES_TOP,
|
@@ -1074,11 +1093,10 @@ rbs_types_bases_top_t *rbs_types_bases_top_new(rbs_allocator_t *allocator, rbs_l
|
|
1074
1093
|
|
1075
1094
|
return instance;
|
1076
1095
|
}
|
1077
|
-
#line
|
1096
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
1078
1097
|
rbs_types_bases_void_t *rbs_types_bases_void_new(rbs_allocator_t *allocator, rbs_location_t *location) {
|
1079
1098
|
rbs_types_bases_void_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_void_t);
|
1080
1099
|
|
1081
|
-
|
1082
1100
|
*instance = (rbs_types_bases_void_t) {
|
1083
1101
|
.base = (rbs_node_t) {
|
1084
1102
|
.type = RBS_TYPES_BASES_VOID,
|
@@ -1088,11 +1106,10 @@ rbs_types_bases_void_t *rbs_types_bases_void_new(rbs_allocator_t *allocator, rbs
|
|
1088
1106
|
|
1089
1107
|
return instance;
|
1090
1108
|
}
|
1091
|
-
#line
|
1109
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
1092
1110
|
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) {
|
1093
1111
|
rbs_types_block_t *instance = rbs_allocator_alloc(allocator, rbs_types_block_t);
|
1094
1112
|
|
1095
|
-
|
1096
1113
|
*instance = (rbs_types_block_t) {
|
1097
1114
|
.base = (rbs_node_t) {
|
1098
1115
|
.type = RBS_TYPES_BLOCK,
|
@@ -1105,11 +1122,10 @@ rbs_types_block_t *rbs_types_block_new(rbs_allocator_t *allocator, rbs_location_
|
|
1105
1122
|
|
1106
1123
|
return instance;
|
1107
1124
|
}
|
1108
|
-
#line
|
1125
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
1109
1126
|
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) {
|
1110
1127
|
rbs_types_class_instance_t *instance = rbs_allocator_alloc(allocator, rbs_types_class_instance_t);
|
1111
1128
|
|
1112
|
-
|
1113
1129
|
*instance = (rbs_types_class_instance_t) {
|
1114
1130
|
.base = (rbs_node_t) {
|
1115
1131
|
.type = RBS_TYPES_CLASS_INSTANCE,
|
@@ -1121,11 +1137,10 @@ rbs_types_class_instance_t *rbs_types_class_instance_new(rbs_allocator_t *alloca
|
|
1121
1137
|
|
1122
1138
|
return instance;
|
1123
1139
|
}
|
1124
|
-
#line
|
1140
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
1125
1141
|
rbs_types_class_singleton_t *rbs_types_class_singleton_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name) {
|
1126
1142
|
rbs_types_class_singleton_t *instance = rbs_allocator_alloc(allocator, rbs_types_class_singleton_t);
|
1127
1143
|
|
1128
|
-
|
1129
1144
|
*instance = (rbs_types_class_singleton_t) {
|
1130
1145
|
.base = (rbs_node_t) {
|
1131
1146
|
.type = RBS_TYPES_CLASS_SINGLETON,
|
@@ -1136,11 +1151,10 @@ rbs_types_class_singleton_t *rbs_types_class_singleton_new(rbs_allocator_t *allo
|
|
1136
1151
|
|
1137
1152
|
return instance;
|
1138
1153
|
}
|
1139
|
-
#line
|
1154
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
1140
1155
|
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) {
|
1141
1156
|
rbs_types_function_t *instance = rbs_allocator_alloc(allocator, rbs_types_function_t);
|
1142
1157
|
|
1143
|
-
|
1144
1158
|
*instance = (rbs_types_function_t) {
|
1145
1159
|
.base = (rbs_node_t) {
|
1146
1160
|
.type = RBS_TYPES_FUNCTION,
|
@@ -1158,11 +1172,10 @@ rbs_types_function_t *rbs_types_function_new(rbs_allocator_t *allocator, rbs_loc
|
|
1158
1172
|
|
1159
1173
|
return instance;
|
1160
1174
|
}
|
1161
|
-
#line
|
1175
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
1162
1176
|
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) {
|
1163
1177
|
rbs_types_function_param_t *instance = rbs_allocator_alloc(allocator, rbs_types_function_param_t);
|
1164
1178
|
|
1165
|
-
|
1166
1179
|
*instance = (rbs_types_function_param_t) {
|
1167
1180
|
.base = (rbs_node_t) {
|
1168
1181
|
.type = RBS_TYPES_FUNCTION_PARAM,
|
@@ -1174,11 +1187,10 @@ rbs_types_function_param_t *rbs_types_function_param_new(rbs_allocator_t *alloca
|
|
1174
1187
|
|
1175
1188
|
return instance;
|
1176
1189
|
}
|
1177
|
-
#line
|
1190
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
1178
1191
|
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) {
|
1179
1192
|
rbs_types_interface_t *instance = rbs_allocator_alloc(allocator, rbs_types_interface_t);
|
1180
1193
|
|
1181
|
-
|
1182
1194
|
*instance = (rbs_types_interface_t) {
|
1183
1195
|
.base = (rbs_node_t) {
|
1184
1196
|
.type = RBS_TYPES_INTERFACE,
|
@@ -1190,11 +1202,10 @@ rbs_types_interface_t *rbs_types_interface_new(rbs_allocator_t *allocator, rbs_l
|
|
1190
1202
|
|
1191
1203
|
return instance;
|
1192
1204
|
}
|
1193
|
-
#line
|
1205
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
1194
1206
|
rbs_types_intersection_t *rbs_types_intersection_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_list_t *types) {
|
1195
1207
|
rbs_types_intersection_t *instance = rbs_allocator_alloc(allocator, rbs_types_intersection_t);
|
1196
1208
|
|
1197
|
-
|
1198
1209
|
*instance = (rbs_types_intersection_t) {
|
1199
1210
|
.base = (rbs_node_t) {
|
1200
1211
|
.type = RBS_TYPES_INTERSECTION,
|
@@ -1205,11 +1216,10 @@ rbs_types_intersection_t *rbs_types_intersection_new(rbs_allocator_t *allocator,
|
|
1205
1216
|
|
1206
1217
|
return instance;
|
1207
1218
|
}
|
1208
|
-
#line
|
1219
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
1209
1220
|
rbs_types_literal_t *rbs_types_literal_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_t *literal) {
|
1210
1221
|
rbs_types_literal_t *instance = rbs_allocator_alloc(allocator, rbs_types_literal_t);
|
1211
1222
|
|
1212
|
-
|
1213
1223
|
*instance = (rbs_types_literal_t) {
|
1214
1224
|
.base = (rbs_node_t) {
|
1215
1225
|
.type = RBS_TYPES_LITERAL,
|
@@ -1220,11 +1230,10 @@ rbs_types_literal_t *rbs_types_literal_new(rbs_allocator_t *allocator, rbs_locat
|
|
1220
1230
|
|
1221
1231
|
return instance;
|
1222
1232
|
}
|
1223
|
-
#line
|
1233
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
1224
1234
|
rbs_types_optional_t *rbs_types_optional_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_t *type) {
|
1225
1235
|
rbs_types_optional_t *instance = rbs_allocator_alloc(allocator, rbs_types_optional_t);
|
1226
1236
|
|
1227
|
-
|
1228
1237
|
*instance = (rbs_types_optional_t) {
|
1229
1238
|
.base = (rbs_node_t) {
|
1230
1239
|
.type = RBS_TYPES_OPTIONAL,
|
@@ -1235,11 +1244,10 @@ rbs_types_optional_t *rbs_types_optional_new(rbs_allocator_t *allocator, rbs_loc
|
|
1235
1244
|
|
1236
1245
|
return instance;
|
1237
1246
|
}
|
1238
|
-
#line
|
1247
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
1239
1248
|
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) {
|
1240
1249
|
rbs_types_proc_t *instance = rbs_allocator_alloc(allocator, rbs_types_proc_t);
|
1241
1250
|
|
1242
|
-
|
1243
1251
|
*instance = (rbs_types_proc_t) {
|
1244
1252
|
.base = (rbs_node_t) {
|
1245
1253
|
.type = RBS_TYPES_PROC,
|
@@ -1252,11 +1260,10 @@ rbs_types_proc_t *rbs_types_proc_new(rbs_allocator_t *allocator, rbs_location_t
|
|
1252
1260
|
|
1253
1261
|
return instance;
|
1254
1262
|
}
|
1255
|
-
#line
|
1263
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
1256
1264
|
rbs_types_record_t *rbs_types_record_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_hash_t *all_fields) {
|
1257
1265
|
rbs_types_record_t *instance = rbs_allocator_alloc(allocator, rbs_types_record_t);
|
1258
1266
|
|
1259
|
-
|
1260
1267
|
*instance = (rbs_types_record_t) {
|
1261
1268
|
.base = (rbs_node_t) {
|
1262
1269
|
.type = RBS_TYPES_RECORD,
|
@@ -1267,11 +1274,10 @@ rbs_types_record_t *rbs_types_record_new(rbs_allocator_t *allocator, rbs_locatio
|
|
1267
1274
|
|
1268
1275
|
return instance;
|
1269
1276
|
}
|
1270
|
-
#line
|
1277
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
1271
1278
|
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) {
|
1272
1279
|
rbs_types_record_field_type_t *instance = rbs_allocator_alloc(allocator, rbs_types_record_field_type_t);
|
1273
1280
|
|
1274
|
-
|
1275
1281
|
*instance = (rbs_types_record_field_type_t) {
|
1276
1282
|
.base = (rbs_node_t) {
|
1277
1283
|
.type = RBS_TYPES_RECORD_FIELD_TYPE,
|
@@ -1283,11 +1289,10 @@ rbs_types_record_field_type_t *rbs_types_record_field_type_new(rbs_allocator_t *
|
|
1283
1289
|
|
1284
1290
|
return instance;
|
1285
1291
|
}
|
1286
|
-
#line
|
1292
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
1287
1293
|
rbs_types_tuple_t *rbs_types_tuple_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_list_t *types) {
|
1288
1294
|
rbs_types_tuple_t *instance = rbs_allocator_alloc(allocator, rbs_types_tuple_t);
|
1289
1295
|
|
1290
|
-
|
1291
1296
|
*instance = (rbs_types_tuple_t) {
|
1292
1297
|
.base = (rbs_node_t) {
|
1293
1298
|
.type = RBS_TYPES_TUPLE,
|
@@ -1298,11 +1303,10 @@ rbs_types_tuple_t *rbs_types_tuple_new(rbs_allocator_t *allocator, rbs_location_
|
|
1298
1303
|
|
1299
1304
|
return instance;
|
1300
1305
|
}
|
1301
|
-
#line
|
1306
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
1302
1307
|
rbs_types_union_t *rbs_types_union_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_list_t *types) {
|
1303
1308
|
rbs_types_union_t *instance = rbs_allocator_alloc(allocator, rbs_types_union_t);
|
1304
1309
|
|
1305
|
-
|
1306
1310
|
*instance = (rbs_types_union_t) {
|
1307
1311
|
.base = (rbs_node_t) {
|
1308
1312
|
.type = RBS_TYPES_UNION,
|
@@ -1313,11 +1317,10 @@ rbs_types_union_t *rbs_types_union_new(rbs_allocator_t *allocator, rbs_location_
|
|
1313
1317
|
|
1314
1318
|
return instance;
|
1315
1319
|
}
|
1316
|
-
#line
|
1320
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
1317
1321
|
rbs_types_untyped_function_t *rbs_types_untyped_function_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_t *return_type) {
|
1318
1322
|
rbs_types_untyped_function_t *instance = rbs_allocator_alloc(allocator, rbs_types_untyped_function_t);
|
1319
1323
|
|
1320
|
-
|
1321
1324
|
*instance = (rbs_types_untyped_function_t) {
|
1322
1325
|
.base = (rbs_node_t) {
|
1323
1326
|
.type = RBS_TYPES_UNTYPED_FUNCTION,
|
@@ -1328,11 +1331,10 @@ rbs_types_untyped_function_t *rbs_types_untyped_function_new(rbs_allocator_t *al
|
|
1328
1331
|
|
1329
1332
|
return instance;
|
1330
1333
|
}
|
1331
|
-
#line
|
1334
|
+
#line 156 "prism/templates/src/ast.c.erb"
|
1332
1335
|
rbs_types_variable_t *rbs_types_variable_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_ast_symbol_t *name) {
|
1333
1336
|
rbs_types_variable_t *instance = rbs_allocator_alloc(allocator, rbs_types_variable_t);
|
1334
1337
|
|
1335
|
-
|
1336
1338
|
*instance = (rbs_types_variable_t) {
|
1337
1339
|
.base = (rbs_node_t) {
|
1338
1340
|
.type = RBS_TYPES_VARIABLE,
|