rbs 4.0.0.dev.5 → 4.0.0
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/c-check.yml +8 -4
- data/.github/workflows/comments.yml +3 -1
- data/.github/workflows/dependabot.yml +1 -1
- data/.github/workflows/ruby.yml +10 -0
- data/.github/workflows/rust.yml +95 -0
- data/CHANGELOG.md +323 -0
- data/Rakefile +12 -29
- data/Steepfile +1 -0
- data/config.yml +393 -37
- data/core/array.rbs +218 -188
- data/core/basic_object.rbs +9 -8
- data/core/class.rbs +6 -5
- data/core/comparable.rbs +45 -31
- data/core/complex.rbs +52 -40
- data/core/dir.rbs +57 -45
- data/core/encoding.rbs +5 -5
- data/core/enumerable.rbs +96 -91
- data/core/enumerator.rbs +4 -3
- data/core/errno.rbs +3 -2
- data/core/errors.rbs +31 -29
- data/core/exception.rbs +12 -12
- data/core/fiber.rbs +36 -36
- data/core/file.rbs +186 -113
- data/core/file_test.rbs +2 -2
- data/core/float.rbs +41 -32
- data/core/gc.rbs +78 -70
- data/core/hash.rbs +70 -60
- data/core/integer.rbs +32 -28
- data/core/io/buffer.rbs +36 -36
- data/core/io/wait.rbs +7 -7
- data/core/io.rbs +120 -135
- data/core/kernel.rbs +189 -139
- data/core/marshal.rbs +3 -3
- data/core/match_data.rbs +14 -12
- data/core/math.rbs +69 -67
- data/core/method.rbs +6 -6
- data/core/module.rbs +146 -85
- data/core/nil_class.rbs +4 -3
- data/core/numeric.rbs +35 -32
- data/core/object.rbs +6 -8
- data/core/object_space.rbs +11 -10
- data/core/pathname.rbs +131 -81
- data/core/proc.rbs +65 -33
- data/core/process.rbs +219 -201
- data/core/ractor.rbs +15 -11
- data/core/random.rbs +4 -3
- data/core/range.rbs +52 -47
- data/core/rational.rbs +5 -5
- data/core/rbs/unnamed/argf.rbs +58 -51
- data/core/rbs/unnamed/env_class.rbs +18 -13
- data/core/rbs/unnamed/main_class.rbs +123 -0
- data/core/rbs/unnamed/random.rbs +7 -5
- data/core/regexp.rbs +236 -197
- data/core/ruby.rbs +1 -1
- data/core/ruby_vm.rbs +32 -30
- data/core/rubygems/config_file.rbs +5 -5
- data/core/rubygems/errors.rbs +1 -1
- data/core/rubygems/requirement.rbs +5 -5
- data/core/rubygems/rubygems.rbs +5 -3
- data/core/set.rbs +17 -16
- data/core/signal.rbs +2 -2
- data/core/string.rbs +311 -292
- data/core/struct.rbs +26 -25
- data/core/symbol.rbs +25 -24
- data/core/thread.rbs +40 -34
- data/core/time.rbs +47 -42
- data/core/trace_point.rbs +34 -31
- data/core/true_class.rbs +2 -2
- data/core/unbound_method.rbs +10 -10
- data/core/warning.rbs +7 -7
- data/docs/collection.md +1 -1
- data/docs/config.md +171 -0
- data/docs/inline.md +110 -4
- data/docs/syntax.md +13 -12
- data/ext/rbs_extension/ast_translation.c +489 -135
- data/ext/rbs_extension/class_constants.c +8 -0
- data/ext/rbs_extension/class_constants.h +4 -0
- data/ext/rbs_extension/legacy_location.c +28 -51
- data/ext/rbs_extension/legacy_location.h +37 -0
- data/ext/rbs_extension/main.c +12 -20
- data/include/rbs/ast.h +423 -195
- data/include/rbs/lexer.h +2 -2
- data/include/rbs/location.h +25 -44
- data/include/rbs/parser.h +2 -2
- data/include/rbs/util/rbs_constant_pool.h +0 -3
- data/include/rbs.h +8 -0
- data/lib/rbs/ast/ruby/annotations.rb +157 -4
- data/lib/rbs/ast/ruby/members.rb +374 -22
- data/lib/rbs/cli/validate.rb +5 -60
- data/lib/rbs/collection/config/lockfile_generator.rb +6 -2
- data/lib/rbs/definition_builder.rb +60 -27
- data/lib/rbs/errors.rb +0 -11
- data/lib/rbs/inline_parser.rb +1 -1
- data/lib/rbs/parser_aux.rb +20 -7
- data/lib/rbs/prototype/helpers.rb +57 -0
- data/lib/rbs/prototype/rb.rb +1 -26
- data/lib/rbs/prototype/rbi.rb +1 -20
- data/lib/rbs/test/type_check.rb +3 -0
- data/lib/rbs/types.rb +62 -52
- data/lib/rbs/unit_test/type_assertions.rb +35 -8
- data/lib/rbs/version.rb +1 -1
- data/lib/rbs.rb +0 -1
- data/rbs.gemspec +1 -1
- data/rust/.gitignore +1 -0
- data/rust/Cargo.lock +378 -0
- data/rust/Cargo.toml +7 -0
- data/rust/ruby-rbs/Cargo.toml +22 -0
- data/rust/ruby-rbs/build.rs +764 -0
- data/rust/ruby-rbs/examples/locations.rs +60 -0
- data/rust/ruby-rbs/src/lib.rs +1 -0
- data/rust/ruby-rbs/src/node/mod.rs +742 -0
- data/rust/ruby-rbs/tests/sanity.rs +47 -0
- data/rust/ruby-rbs/vendor/rbs/config.yml +1 -0
- data/rust/ruby-rbs-sys/Cargo.toml +23 -0
- data/rust/ruby-rbs-sys/build.rs +204 -0
- data/rust/ruby-rbs-sys/src/lib.rs +50 -0
- data/rust/ruby-rbs-sys/vendor/rbs/include +1 -0
- data/rust/ruby-rbs-sys/vendor/rbs/src +1 -0
- data/rust/ruby-rbs-sys/wrapper.h +1 -0
- data/sig/ast/ruby/annotations.rbs +191 -4
- data/sig/ast/ruby/members.rbs +21 -1
- data/sig/cli/validate.rbs +1 -6
- data/sig/definition_builder.rbs +2 -0
- data/sig/errors.rbs +0 -8
- data/sig/method_types.rbs +1 -1
- data/sig/parser.rbs +17 -13
- data/sig/prototype/helpers.rbs +2 -0
- data/sig/types.rbs +10 -11
- data/sig/unit_test/spy.rbs +0 -8
- data/sig/unit_test/type_assertions.rbs +11 -0
- data/src/ast.c +339 -161
- data/src/lexstate.c +1 -1
- data/src/location.c +8 -48
- data/src/parser.c +674 -480
- data/src/util/rbs_constant_pool.c +0 -4
- data/stdlib/bigdecimal/0/big_decimal.rbs +16 -16
- data/stdlib/cgi-escape/0/escape.rbs +4 -4
- data/stdlib/coverage/0/coverage.rbs +4 -3
- data/stdlib/date/0/date.rbs +33 -28
- data/stdlib/date/0/date_time.rbs +24 -23
- data/stdlib/did_you_mean/0/did_you_mean.rbs +17 -16
- data/stdlib/erb/0/erb.rbs +64 -53
- data/stdlib/etc/0/etc.rbs +55 -50
- data/stdlib/fileutils/0/fileutils.rbs +138 -125
- data/stdlib/forwardable/0/forwardable.rbs +10 -10
- data/stdlib/io-console/0/io-console.rbs +2 -2
- data/stdlib/json/0/json.rbs +135 -108
- data/stdlib/monitor/0/monitor.rbs +3 -3
- data/stdlib/net-http/0/net-http.rbs +159 -134
- data/stdlib/objspace/0/objspace.rbs +8 -7
- data/stdlib/open-uri/0/open-uri.rbs +8 -8
- data/stdlib/open3/0/open3.rbs +36 -35
- data/stdlib/openssl/0/openssl.rbs +144 -129
- data/stdlib/optparse/0/optparse.rbs +18 -14
- data/stdlib/pathname/0/pathname.rbs +2 -2
- data/stdlib/pp/0/pp.rbs +9 -8
- data/stdlib/prettyprint/0/prettyprint.rbs +7 -7
- data/stdlib/pstore/0/pstore.rbs +35 -30
- data/stdlib/psych/0/psych.rbs +61 -8
- data/stdlib/psych/0/store.rbs +2 -4
- data/stdlib/pty/0/pty.rbs +9 -6
- data/stdlib/random-formatter/0/random-formatter.rbs +2 -2
- data/stdlib/ripper/0/ripper.rbs +20 -17
- data/stdlib/securerandom/0/securerandom.rbs +1 -1
- data/stdlib/shellwords/0/shellwords.rbs +2 -2
- data/stdlib/socket/0/addrinfo.rbs +7 -7
- data/stdlib/socket/0/basic_socket.rbs +3 -3
- data/stdlib/socket/0/ip_socket.rbs +10 -8
- data/stdlib/socket/0/socket.rbs +10 -9
- data/stdlib/socket/0/tcp_server.rbs +1 -1
- data/stdlib/socket/0/tcp_socket.rbs +1 -1
- data/stdlib/socket/0/udp_socket.rbs +1 -1
- data/stdlib/socket/0/unix_server.rbs +1 -1
- data/stdlib/stringio/0/stringio.rbs +55 -54
- data/stdlib/strscan/0/string_scanner.rbs +46 -44
- data/stdlib/tempfile/0/tempfile.rbs +24 -20
- data/stdlib/time/0/time.rbs +7 -5
- data/stdlib/tsort/0/tsort.rbs +7 -6
- data/stdlib/uri/0/common.rbs +26 -18
- data/stdlib/uri/0/file.rbs +2 -2
- data/stdlib/uri/0/generic.rbs +2 -2
- data/stdlib/uri/0/http.rbs +2 -2
- data/stdlib/uri/0/ldap.rbs +2 -2
- data/stdlib/uri/0/mailto.rbs +3 -3
- data/stdlib/uri/0/rfc2396_parser.rbs +6 -5
- data/stdlib/zlib/0/deflate.rbs +4 -3
- data/stdlib/zlib/0/gzip_reader.rbs +4 -4
- data/stdlib/zlib/0/gzip_writer.rbs +14 -12
- data/stdlib/zlib/0/inflate.rbs +1 -1
- data/stdlib/zlib/0/need_dict.rbs +1 -1
- metadata +23 -5
- data/.github/workflows/valgrind.yml +0 -42
data/src/ast.c
CHANGED
|
@@ -75,10 +75,14 @@ const char *rbs_node_type_name(rbs_node_t *node) {
|
|
|
75
75
|
return "RBS::AST::Members::Private";
|
|
76
76
|
case RBS_AST_MEMBERS_PUBLIC:
|
|
77
77
|
return "RBS::AST::Members::Public";
|
|
78
|
+
case RBS_AST_RUBY_ANNOTATIONS_BLOCK_PARAM_TYPE_ANNOTATION:
|
|
79
|
+
return "RBS::AST::Ruby::Annotations::BlockParamTypeAnnotation";
|
|
78
80
|
case RBS_AST_RUBY_ANNOTATIONS_CLASS_ALIAS_ANNOTATION:
|
|
79
81
|
return "RBS::AST::Ruby::Annotations::ClassAliasAnnotation";
|
|
80
82
|
case RBS_AST_RUBY_ANNOTATIONS_COLON_METHOD_TYPE_ANNOTATION:
|
|
81
83
|
return "RBS::AST::Ruby::Annotations::ColonMethodTypeAnnotation";
|
|
84
|
+
case RBS_AST_RUBY_ANNOTATIONS_DOUBLE_SPLAT_PARAM_TYPE_ANNOTATION:
|
|
85
|
+
return "RBS::AST::Ruby::Annotations::DoubleSplatParamTypeAnnotation";
|
|
82
86
|
case RBS_AST_RUBY_ANNOTATIONS_INSTANCE_VARIABLE_ANNOTATION:
|
|
83
87
|
return "RBS::AST::Ruby::Annotations::InstanceVariableAnnotation";
|
|
84
88
|
case RBS_AST_RUBY_ANNOTATIONS_METHOD_TYPES_ANNOTATION:
|
|
@@ -87,10 +91,14 @@ const char *rbs_node_type_name(rbs_node_t *node) {
|
|
|
87
91
|
return "RBS::AST::Ruby::Annotations::ModuleAliasAnnotation";
|
|
88
92
|
case RBS_AST_RUBY_ANNOTATIONS_NODE_TYPE_ASSERTION:
|
|
89
93
|
return "RBS::AST::Ruby::Annotations::NodeTypeAssertion";
|
|
94
|
+
case RBS_AST_RUBY_ANNOTATIONS_PARAM_TYPE_ANNOTATION:
|
|
95
|
+
return "RBS::AST::Ruby::Annotations::ParamTypeAnnotation";
|
|
90
96
|
case RBS_AST_RUBY_ANNOTATIONS_RETURN_TYPE_ANNOTATION:
|
|
91
97
|
return "RBS::AST::Ruby::Annotations::ReturnTypeAnnotation";
|
|
92
98
|
case RBS_AST_RUBY_ANNOTATIONS_SKIP_ANNOTATION:
|
|
93
99
|
return "RBS::AST::Ruby::Annotations::SkipAnnotation";
|
|
100
|
+
case RBS_AST_RUBY_ANNOTATIONS_SPLAT_PARAM_TYPE_ANNOTATION:
|
|
101
|
+
return "RBS::AST::Ruby::Annotations::SplatParamTypeAnnotation";
|
|
94
102
|
case RBS_AST_RUBY_ANNOTATIONS_TYPE_APPLICATION_ANNOTATION:
|
|
95
103
|
return "RBS::AST::Ruby::Annotations::TypeApplicationAnnotation";
|
|
96
104
|
case RBS_AST_STRING:
|
|
@@ -217,8 +225,6 @@ bool rbs_node_equal(rbs_node_t *lhs, rbs_node_t *rhs) {
|
|
|
217
225
|
switch (lhs->type) {
|
|
218
226
|
case RBS_AST_SYMBOL:
|
|
219
227
|
return ((rbs_ast_symbol_t *) lhs)->constant_id == ((rbs_ast_symbol_t *) rhs)->constant_id;
|
|
220
|
-
case RBS_KEYWORD:
|
|
221
|
-
return ((rbs_keyword_t *) lhs)->constant_id == ((rbs_keyword_t *) rhs)->constant_id;
|
|
222
228
|
case RBS_AST_BOOL:
|
|
223
229
|
return ((rbs_ast_bool_t *) lhs)->value == ((rbs_ast_bool_t *) rhs)->value;
|
|
224
230
|
case RBS_AST_INTEGER:
|
|
@@ -270,21 +276,7 @@ rbs_node_t *rbs_hash_get(rbs_hash_t *hash, rbs_node_t *key) {
|
|
|
270
276
|
return node ? node->value : NULL;
|
|
271
277
|
}
|
|
272
278
|
|
|
273
|
-
|
|
274
|
-
rbs_keyword_t *instance = rbs_allocator_alloc(allocator, rbs_keyword_t);
|
|
275
|
-
|
|
276
|
-
*instance = (rbs_keyword_t) {
|
|
277
|
-
.base = (rbs_node_t) {
|
|
278
|
-
.type = RBS_KEYWORD,
|
|
279
|
-
.location = location,
|
|
280
|
-
},
|
|
281
|
-
.constant_id = constant_id,
|
|
282
|
-
};
|
|
283
|
-
|
|
284
|
-
return instance;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
rbs_ast_symbol_t *rbs_ast_symbol_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_constant_pool_t *constant_pool, rbs_constant_id_t constant_id) {
|
|
279
|
+
rbs_ast_symbol_t *rbs_ast_symbol_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_constant_pool_t *constant_pool, rbs_constant_id_t constant_id) {
|
|
288
280
|
rbs_ast_symbol_t *instance = rbs_allocator_alloc(allocator, rbs_ast_symbol_t);
|
|
289
281
|
|
|
290
282
|
*instance = (rbs_ast_symbol_t) {
|
|
@@ -298,8 +290,8 @@ rbs_ast_symbol_t *rbs_ast_symbol_new(rbs_allocator_t *allocator, rbs_location_t
|
|
|
298
290
|
return instance;
|
|
299
291
|
}
|
|
300
292
|
|
|
301
|
-
#line
|
|
302
|
-
rbs_ast_annotation_t *rbs_ast_annotation_new(rbs_allocator_t *allocator,
|
|
293
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
294
|
+
rbs_ast_annotation_t *rbs_ast_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_string_t string) {
|
|
303
295
|
rbs_ast_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_annotation_t);
|
|
304
296
|
|
|
305
297
|
*instance = (rbs_ast_annotation_t) {
|
|
@@ -312,8 +304,8 @@ rbs_ast_annotation_t *rbs_ast_annotation_new(rbs_allocator_t *allocator, rbs_loc
|
|
|
312
304
|
|
|
313
305
|
return instance;
|
|
314
306
|
}
|
|
315
|
-
#line
|
|
316
|
-
rbs_ast_bool_t *rbs_ast_bool_new(rbs_allocator_t *allocator,
|
|
307
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
308
|
+
rbs_ast_bool_t *rbs_ast_bool_new(rbs_allocator_t *allocator, rbs_location_range location, bool value) {
|
|
317
309
|
rbs_ast_bool_t *instance = rbs_allocator_alloc(allocator, rbs_ast_bool_t);
|
|
318
310
|
|
|
319
311
|
*instance = (rbs_ast_bool_t) {
|
|
@@ -326,8 +318,8 @@ rbs_ast_bool_t *rbs_ast_bool_new(rbs_allocator_t *allocator, rbs_location_t *loc
|
|
|
326
318
|
|
|
327
319
|
return instance;
|
|
328
320
|
}
|
|
329
|
-
#line
|
|
330
|
-
rbs_ast_comment_t *rbs_ast_comment_new(rbs_allocator_t *allocator,
|
|
321
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
322
|
+
rbs_ast_comment_t *rbs_ast_comment_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_string_t string) {
|
|
331
323
|
rbs_ast_comment_t *instance = rbs_allocator_alloc(allocator, rbs_ast_comment_t);
|
|
332
324
|
|
|
333
325
|
*instance = (rbs_ast_comment_t) {
|
|
@@ -340,8 +332,8 @@ rbs_ast_comment_t *rbs_ast_comment_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
340
332
|
|
|
341
333
|
return instance;
|
|
342
334
|
}
|
|
343
|
-
#line
|
|
344
|
-
rbs_ast_declarations_class_t *rbs_ast_declarations_class_new(rbs_allocator_t *allocator,
|
|
335
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
336
|
+
rbs_ast_declarations_class_t *rbs_ast_declarations_class_new(rbs_allocator_t *allocator, rbs_location_range 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, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range end_range) {
|
|
345
337
|
rbs_ast_declarations_class_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_class_t);
|
|
346
338
|
|
|
347
339
|
*instance = (rbs_ast_declarations_class_t) {
|
|
@@ -355,12 +347,17 @@ rbs_ast_declarations_class_t *rbs_ast_declarations_class_new(rbs_allocator_t *al
|
|
|
355
347
|
.members = members,
|
|
356
348
|
.annotations = annotations,
|
|
357
349
|
.comment = comment,
|
|
350
|
+
.keyword_range = keyword_range,
|
|
351
|
+
.name_range = name_range,
|
|
352
|
+
.end_range = end_range,
|
|
353
|
+
.type_params_range = RBS_LOCATION_NULL_RANGE,
|
|
354
|
+
.lt_range = RBS_LOCATION_NULL_RANGE,
|
|
358
355
|
};
|
|
359
356
|
|
|
360
357
|
return instance;
|
|
361
358
|
}
|
|
362
|
-
#line
|
|
363
|
-
rbs_ast_declarations_class_super_t *rbs_ast_declarations_class_super_new(rbs_allocator_t *allocator,
|
|
359
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
360
|
+
rbs_ast_declarations_class_super_t *rbs_ast_declarations_class_super_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *name, rbs_node_list_t *args, rbs_location_range name_range) {
|
|
364
361
|
rbs_ast_declarations_class_super_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_class_super_t);
|
|
365
362
|
|
|
366
363
|
*instance = (rbs_ast_declarations_class_super_t) {
|
|
@@ -370,12 +367,14 @@ rbs_ast_declarations_class_super_t *rbs_ast_declarations_class_super_new(rbs_all
|
|
|
370
367
|
},
|
|
371
368
|
.name = name,
|
|
372
369
|
.args = args,
|
|
370
|
+
.name_range = name_range,
|
|
371
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
373
372
|
};
|
|
374
373
|
|
|
375
374
|
return instance;
|
|
376
375
|
}
|
|
377
|
-
#line
|
|
378
|
-
rbs_ast_declarations_class_alias_t *rbs_ast_declarations_class_alias_new(rbs_allocator_t *allocator,
|
|
376
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
377
|
+
rbs_ast_declarations_class_alias_t *rbs_ast_declarations_class_alias_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *new_name, rbs_type_name_t *old_name, rbs_ast_comment_t *comment, rbs_node_list_t *annotations, rbs_location_range keyword_range, rbs_location_range new_name_range, rbs_location_range eq_range, rbs_location_range old_name_range) {
|
|
379
378
|
rbs_ast_declarations_class_alias_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_class_alias_t);
|
|
380
379
|
|
|
381
380
|
*instance = (rbs_ast_declarations_class_alias_t) {
|
|
@@ -387,12 +386,16 @@ rbs_ast_declarations_class_alias_t *rbs_ast_declarations_class_alias_new(rbs_all
|
|
|
387
386
|
.old_name = old_name,
|
|
388
387
|
.comment = comment,
|
|
389
388
|
.annotations = annotations,
|
|
389
|
+
.keyword_range = keyword_range,
|
|
390
|
+
.new_name_range = new_name_range,
|
|
391
|
+
.eq_range = eq_range,
|
|
392
|
+
.old_name_range = old_name_range,
|
|
390
393
|
};
|
|
391
394
|
|
|
392
395
|
return instance;
|
|
393
396
|
}
|
|
394
|
-
#line
|
|
395
|
-
rbs_ast_declarations_constant_t *rbs_ast_declarations_constant_new(rbs_allocator_t *allocator,
|
|
397
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
398
|
+
rbs_ast_declarations_constant_t *rbs_ast_declarations_constant_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *name, rbs_node_t *type, rbs_ast_comment_t *comment, rbs_node_list_t *annotations, rbs_location_range name_range, rbs_location_range colon_range) {
|
|
396
399
|
rbs_ast_declarations_constant_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_constant_t);
|
|
397
400
|
|
|
398
401
|
*instance = (rbs_ast_declarations_constant_t) {
|
|
@@ -404,12 +407,14 @@ rbs_ast_declarations_constant_t *rbs_ast_declarations_constant_new(rbs_allocator
|
|
|
404
407
|
.type = type,
|
|
405
408
|
.comment = comment,
|
|
406
409
|
.annotations = annotations,
|
|
410
|
+
.name_range = name_range,
|
|
411
|
+
.colon_range = colon_range,
|
|
407
412
|
};
|
|
408
413
|
|
|
409
414
|
return instance;
|
|
410
415
|
}
|
|
411
|
-
#line
|
|
412
|
-
rbs_ast_declarations_global_t *rbs_ast_declarations_global_new(rbs_allocator_t *allocator,
|
|
416
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
417
|
+
rbs_ast_declarations_global_t *rbs_ast_declarations_global_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_ast_comment_t *comment, rbs_node_list_t *annotations, rbs_location_range name_range, rbs_location_range colon_range) {
|
|
413
418
|
rbs_ast_declarations_global_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_global_t);
|
|
414
419
|
|
|
415
420
|
*instance = (rbs_ast_declarations_global_t) {
|
|
@@ -421,12 +426,14 @@ rbs_ast_declarations_global_t *rbs_ast_declarations_global_new(rbs_allocator_t *
|
|
|
421
426
|
.type = type,
|
|
422
427
|
.comment = comment,
|
|
423
428
|
.annotations = annotations,
|
|
429
|
+
.name_range = name_range,
|
|
430
|
+
.colon_range = colon_range,
|
|
424
431
|
};
|
|
425
432
|
|
|
426
433
|
return instance;
|
|
427
434
|
}
|
|
428
|
-
#line
|
|
429
|
-
rbs_ast_declarations_interface_t *rbs_ast_declarations_interface_new(rbs_allocator_t *allocator,
|
|
435
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
436
|
+
rbs_ast_declarations_interface_t *rbs_ast_declarations_interface_new(rbs_allocator_t *allocator, rbs_location_range 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, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range end_range) {
|
|
430
437
|
rbs_ast_declarations_interface_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_interface_t);
|
|
431
438
|
|
|
432
439
|
*instance = (rbs_ast_declarations_interface_t) {
|
|
@@ -439,12 +446,16 @@ rbs_ast_declarations_interface_t *rbs_ast_declarations_interface_new(rbs_allocat
|
|
|
439
446
|
.members = members,
|
|
440
447
|
.annotations = annotations,
|
|
441
448
|
.comment = comment,
|
|
449
|
+
.keyword_range = keyword_range,
|
|
450
|
+
.name_range = name_range,
|
|
451
|
+
.end_range = end_range,
|
|
452
|
+
.type_params_range = RBS_LOCATION_NULL_RANGE,
|
|
442
453
|
};
|
|
443
454
|
|
|
444
455
|
return instance;
|
|
445
456
|
}
|
|
446
|
-
#line
|
|
447
|
-
rbs_ast_declarations_module_t *rbs_ast_declarations_module_new(rbs_allocator_t *allocator,
|
|
457
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
458
|
+
rbs_ast_declarations_module_t *rbs_ast_declarations_module_new(rbs_allocator_t *allocator, rbs_location_range 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, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range end_range) {
|
|
448
459
|
rbs_ast_declarations_module_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_module_t);
|
|
449
460
|
|
|
450
461
|
*instance = (rbs_ast_declarations_module_t) {
|
|
@@ -458,12 +469,18 @@ rbs_ast_declarations_module_t *rbs_ast_declarations_module_new(rbs_allocator_t *
|
|
|
458
469
|
.members = members,
|
|
459
470
|
.annotations = annotations,
|
|
460
471
|
.comment = comment,
|
|
472
|
+
.keyword_range = keyword_range,
|
|
473
|
+
.name_range = name_range,
|
|
474
|
+
.end_range = end_range,
|
|
475
|
+
.type_params_range = RBS_LOCATION_NULL_RANGE,
|
|
476
|
+
.colon_range = RBS_LOCATION_NULL_RANGE,
|
|
477
|
+
.self_types_range = RBS_LOCATION_NULL_RANGE,
|
|
461
478
|
};
|
|
462
479
|
|
|
463
480
|
return instance;
|
|
464
481
|
}
|
|
465
|
-
#line
|
|
466
|
-
rbs_ast_declarations_module_self_t *rbs_ast_declarations_module_self_new(rbs_allocator_t *allocator,
|
|
482
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
483
|
+
rbs_ast_declarations_module_self_t *rbs_ast_declarations_module_self_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *name, rbs_node_list_t *args, rbs_location_range name_range) {
|
|
467
484
|
rbs_ast_declarations_module_self_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_module_self_t);
|
|
468
485
|
|
|
469
486
|
*instance = (rbs_ast_declarations_module_self_t) {
|
|
@@ -473,12 +490,14 @@ rbs_ast_declarations_module_self_t *rbs_ast_declarations_module_self_new(rbs_all
|
|
|
473
490
|
},
|
|
474
491
|
.name = name,
|
|
475
492
|
.args = args,
|
|
493
|
+
.name_range = name_range,
|
|
494
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
476
495
|
};
|
|
477
496
|
|
|
478
497
|
return instance;
|
|
479
498
|
}
|
|
480
|
-
#line
|
|
481
|
-
rbs_ast_declarations_module_alias_t *rbs_ast_declarations_module_alias_new(rbs_allocator_t *allocator,
|
|
499
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
500
|
+
rbs_ast_declarations_module_alias_t *rbs_ast_declarations_module_alias_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *new_name, rbs_type_name_t *old_name, rbs_ast_comment_t *comment, rbs_node_list_t *annotations, rbs_location_range keyword_range, rbs_location_range new_name_range, rbs_location_range eq_range, rbs_location_range old_name_range) {
|
|
482
501
|
rbs_ast_declarations_module_alias_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_module_alias_t);
|
|
483
502
|
|
|
484
503
|
*instance = (rbs_ast_declarations_module_alias_t) {
|
|
@@ -490,12 +509,16 @@ rbs_ast_declarations_module_alias_t *rbs_ast_declarations_module_alias_new(rbs_a
|
|
|
490
509
|
.old_name = old_name,
|
|
491
510
|
.comment = comment,
|
|
492
511
|
.annotations = annotations,
|
|
512
|
+
.keyword_range = keyword_range,
|
|
513
|
+
.new_name_range = new_name_range,
|
|
514
|
+
.eq_range = eq_range,
|
|
515
|
+
.old_name_range = old_name_range,
|
|
493
516
|
};
|
|
494
517
|
|
|
495
518
|
return instance;
|
|
496
519
|
}
|
|
497
|
-
#line
|
|
498
|
-
rbs_ast_declarations_type_alias_t *rbs_ast_declarations_type_alias_new(rbs_allocator_t *allocator,
|
|
520
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
521
|
+
rbs_ast_declarations_type_alias_t *rbs_ast_declarations_type_alias_new(rbs_allocator_t *allocator, rbs_location_range 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, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range eq_range) {
|
|
499
522
|
rbs_ast_declarations_type_alias_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_type_alias_t);
|
|
500
523
|
|
|
501
524
|
*instance = (rbs_ast_declarations_type_alias_t) {
|
|
@@ -508,12 +531,16 @@ rbs_ast_declarations_type_alias_t *rbs_ast_declarations_type_alias_new(rbs_alloc
|
|
|
508
531
|
.type = type,
|
|
509
532
|
.annotations = annotations,
|
|
510
533
|
.comment = comment,
|
|
534
|
+
.keyword_range = keyword_range,
|
|
535
|
+
.name_range = name_range,
|
|
536
|
+
.eq_range = eq_range,
|
|
537
|
+
.type_params_range = RBS_LOCATION_NULL_RANGE,
|
|
511
538
|
};
|
|
512
539
|
|
|
513
540
|
return instance;
|
|
514
541
|
}
|
|
515
|
-
#line
|
|
516
|
-
rbs_ast_directives_use_t *rbs_ast_directives_use_new(rbs_allocator_t *allocator,
|
|
542
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
543
|
+
rbs_ast_directives_use_t *rbs_ast_directives_use_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_list_t *clauses, rbs_location_range keyword_range) {
|
|
517
544
|
rbs_ast_directives_use_t *instance = rbs_allocator_alloc(allocator, rbs_ast_directives_use_t);
|
|
518
545
|
|
|
519
546
|
*instance = (rbs_ast_directives_use_t) {
|
|
@@ -522,12 +549,13 @@ rbs_ast_directives_use_t *rbs_ast_directives_use_new(rbs_allocator_t *allocator,
|
|
|
522
549
|
.location = location,
|
|
523
550
|
},
|
|
524
551
|
.clauses = clauses,
|
|
552
|
+
.keyword_range = keyword_range,
|
|
525
553
|
};
|
|
526
554
|
|
|
527
555
|
return instance;
|
|
528
556
|
}
|
|
529
|
-
#line
|
|
530
|
-
rbs_ast_directives_use_single_clause_t *rbs_ast_directives_use_single_clause_new(rbs_allocator_t *allocator,
|
|
557
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
558
|
+
rbs_ast_directives_use_single_clause_t *rbs_ast_directives_use_single_clause_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *type_name, rbs_ast_symbol_t *new_name, rbs_location_range type_name_range) {
|
|
531
559
|
rbs_ast_directives_use_single_clause_t *instance = rbs_allocator_alloc(allocator, rbs_ast_directives_use_single_clause_t);
|
|
532
560
|
|
|
533
561
|
*instance = (rbs_ast_directives_use_single_clause_t) {
|
|
@@ -537,12 +565,15 @@ rbs_ast_directives_use_single_clause_t *rbs_ast_directives_use_single_clause_new
|
|
|
537
565
|
},
|
|
538
566
|
.type_name = type_name,
|
|
539
567
|
.new_name = new_name,
|
|
568
|
+
.type_name_range = type_name_range,
|
|
569
|
+
.keyword_range = RBS_LOCATION_NULL_RANGE,
|
|
570
|
+
.new_name_range = RBS_LOCATION_NULL_RANGE,
|
|
540
571
|
};
|
|
541
572
|
|
|
542
573
|
return instance;
|
|
543
574
|
}
|
|
544
|
-
#line
|
|
545
|
-
rbs_ast_directives_use_wildcard_clause_t *rbs_ast_directives_use_wildcard_clause_new(rbs_allocator_t *allocator,
|
|
575
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
576
|
+
rbs_ast_directives_use_wildcard_clause_t *rbs_ast_directives_use_wildcard_clause_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_namespace_t *rbs_namespace, rbs_location_range namespace_range, rbs_location_range star_range) {
|
|
546
577
|
rbs_ast_directives_use_wildcard_clause_t *instance = rbs_allocator_alloc(allocator, rbs_ast_directives_use_wildcard_clause_t);
|
|
547
578
|
|
|
548
579
|
*instance = (rbs_ast_directives_use_wildcard_clause_t) {
|
|
@@ -551,12 +582,14 @@ rbs_ast_directives_use_wildcard_clause_t *rbs_ast_directives_use_wildcard_clause
|
|
|
551
582
|
.location = location,
|
|
552
583
|
},
|
|
553
584
|
.rbs_namespace = rbs_namespace,
|
|
585
|
+
.namespace_range = namespace_range,
|
|
586
|
+
.star_range = star_range,
|
|
554
587
|
};
|
|
555
588
|
|
|
556
589
|
return instance;
|
|
557
590
|
}
|
|
558
|
-
#line
|
|
559
|
-
rbs_ast_integer_t *rbs_ast_integer_new(rbs_allocator_t *allocator,
|
|
591
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
592
|
+
rbs_ast_integer_t *rbs_ast_integer_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_string_t string_representation) {
|
|
560
593
|
rbs_ast_integer_t *instance = rbs_allocator_alloc(allocator, rbs_ast_integer_t);
|
|
561
594
|
|
|
562
595
|
*instance = (rbs_ast_integer_t) {
|
|
@@ -569,8 +602,8 @@ rbs_ast_integer_t *rbs_ast_integer_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
569
602
|
|
|
570
603
|
return instance;
|
|
571
604
|
}
|
|
572
|
-
#line
|
|
573
|
-
rbs_ast_members_alias_t *rbs_ast_members_alias_new(rbs_allocator_t *allocator,
|
|
605
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
606
|
+
rbs_ast_members_alias_t *rbs_ast_members_alias_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_ast_symbol_t *new_name, rbs_ast_symbol_t *old_name, enum rbs_alias_kind kind, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, rbs_location_range keyword_range, rbs_location_range new_name_range, rbs_location_range old_name_range) {
|
|
574
607
|
rbs_ast_members_alias_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_alias_t);
|
|
575
608
|
|
|
576
609
|
*instance = (rbs_ast_members_alias_t) {
|
|
@@ -583,12 +616,17 @@ rbs_ast_members_alias_t *rbs_ast_members_alias_new(rbs_allocator_t *allocator, r
|
|
|
583
616
|
.kind = kind,
|
|
584
617
|
.annotations = annotations,
|
|
585
618
|
.comment = comment,
|
|
619
|
+
.keyword_range = keyword_range,
|
|
620
|
+
.new_name_range = new_name_range,
|
|
621
|
+
.old_name_range = old_name_range,
|
|
622
|
+
.new_kind_range = RBS_LOCATION_NULL_RANGE,
|
|
623
|
+
.old_kind_range = RBS_LOCATION_NULL_RANGE,
|
|
586
624
|
};
|
|
587
625
|
|
|
588
626
|
return instance;
|
|
589
627
|
}
|
|
590
|
-
#line
|
|
591
|
-
rbs_ast_members_attr_accessor_t *rbs_ast_members_attr_accessor_new(rbs_allocator_t *allocator,
|
|
628
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
629
|
+
rbs_ast_members_attr_accessor_t *rbs_ast_members_attr_accessor_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_attr_ivar_name_t ivar_name, enum rbs_attribute_kind kind, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, enum rbs_attribute_visibility visibility, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range colon_range) {
|
|
592
630
|
rbs_ast_members_attr_accessor_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_attr_accessor_t);
|
|
593
631
|
|
|
594
632
|
*instance = (rbs_ast_members_attr_accessor_t) {
|
|
@@ -603,12 +641,19 @@ rbs_ast_members_attr_accessor_t *rbs_ast_members_attr_accessor_new(rbs_allocator
|
|
|
603
641
|
.annotations = annotations,
|
|
604
642
|
.comment = comment,
|
|
605
643
|
.visibility = visibility,
|
|
644
|
+
.keyword_range = keyword_range,
|
|
645
|
+
.name_range = name_range,
|
|
646
|
+
.colon_range = colon_range,
|
|
647
|
+
.kind_range = RBS_LOCATION_NULL_RANGE,
|
|
648
|
+
.ivar_range = RBS_LOCATION_NULL_RANGE,
|
|
649
|
+
.ivar_name_range = RBS_LOCATION_NULL_RANGE,
|
|
650
|
+
.visibility_range = RBS_LOCATION_NULL_RANGE,
|
|
606
651
|
};
|
|
607
652
|
|
|
608
653
|
return instance;
|
|
609
654
|
}
|
|
610
|
-
#line
|
|
611
|
-
rbs_ast_members_attr_reader_t *rbs_ast_members_attr_reader_new(rbs_allocator_t *allocator,
|
|
655
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
656
|
+
rbs_ast_members_attr_reader_t *rbs_ast_members_attr_reader_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_attr_ivar_name_t ivar_name, enum rbs_attribute_kind kind, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, enum rbs_attribute_visibility visibility, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range colon_range) {
|
|
612
657
|
rbs_ast_members_attr_reader_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_attr_reader_t);
|
|
613
658
|
|
|
614
659
|
*instance = (rbs_ast_members_attr_reader_t) {
|
|
@@ -623,12 +668,19 @@ rbs_ast_members_attr_reader_t *rbs_ast_members_attr_reader_new(rbs_allocator_t *
|
|
|
623
668
|
.annotations = annotations,
|
|
624
669
|
.comment = comment,
|
|
625
670
|
.visibility = visibility,
|
|
671
|
+
.keyword_range = keyword_range,
|
|
672
|
+
.name_range = name_range,
|
|
673
|
+
.colon_range = colon_range,
|
|
674
|
+
.kind_range = RBS_LOCATION_NULL_RANGE,
|
|
675
|
+
.ivar_range = RBS_LOCATION_NULL_RANGE,
|
|
676
|
+
.ivar_name_range = RBS_LOCATION_NULL_RANGE,
|
|
677
|
+
.visibility_range = RBS_LOCATION_NULL_RANGE,
|
|
626
678
|
};
|
|
627
679
|
|
|
628
680
|
return instance;
|
|
629
681
|
}
|
|
630
|
-
#line
|
|
631
|
-
rbs_ast_members_attr_writer_t *rbs_ast_members_attr_writer_new(rbs_allocator_t *allocator,
|
|
682
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
683
|
+
rbs_ast_members_attr_writer_t *rbs_ast_members_attr_writer_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_attr_ivar_name_t ivar_name, enum rbs_attribute_kind kind, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, enum rbs_attribute_visibility visibility, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range colon_range) {
|
|
632
684
|
rbs_ast_members_attr_writer_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_attr_writer_t);
|
|
633
685
|
|
|
634
686
|
*instance = (rbs_ast_members_attr_writer_t) {
|
|
@@ -643,12 +695,19 @@ rbs_ast_members_attr_writer_t *rbs_ast_members_attr_writer_new(rbs_allocator_t *
|
|
|
643
695
|
.annotations = annotations,
|
|
644
696
|
.comment = comment,
|
|
645
697
|
.visibility = visibility,
|
|
698
|
+
.keyword_range = keyword_range,
|
|
699
|
+
.name_range = name_range,
|
|
700
|
+
.colon_range = colon_range,
|
|
701
|
+
.kind_range = RBS_LOCATION_NULL_RANGE,
|
|
702
|
+
.ivar_range = RBS_LOCATION_NULL_RANGE,
|
|
703
|
+
.ivar_name_range = RBS_LOCATION_NULL_RANGE,
|
|
704
|
+
.visibility_range = RBS_LOCATION_NULL_RANGE,
|
|
646
705
|
};
|
|
647
706
|
|
|
648
707
|
return instance;
|
|
649
708
|
}
|
|
650
|
-
#line
|
|
651
|
-
rbs_ast_members_class_instance_variable_t *rbs_ast_members_class_instance_variable_new(rbs_allocator_t *allocator,
|
|
709
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
710
|
+
rbs_ast_members_class_instance_variable_t *rbs_ast_members_class_instance_variable_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_ast_comment_t *comment, rbs_location_range name_range, rbs_location_range colon_range) {
|
|
652
711
|
rbs_ast_members_class_instance_variable_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_class_instance_variable_t);
|
|
653
712
|
|
|
654
713
|
*instance = (rbs_ast_members_class_instance_variable_t) {
|
|
@@ -659,12 +718,15 @@ rbs_ast_members_class_instance_variable_t *rbs_ast_members_class_instance_variab
|
|
|
659
718
|
.name = name,
|
|
660
719
|
.type = type,
|
|
661
720
|
.comment = comment,
|
|
721
|
+
.name_range = name_range,
|
|
722
|
+
.colon_range = colon_range,
|
|
723
|
+
.kind_range = RBS_LOCATION_NULL_RANGE,
|
|
662
724
|
};
|
|
663
725
|
|
|
664
726
|
return instance;
|
|
665
727
|
}
|
|
666
|
-
#line
|
|
667
|
-
rbs_ast_members_class_variable_t *rbs_ast_members_class_variable_new(rbs_allocator_t *allocator,
|
|
728
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
729
|
+
rbs_ast_members_class_variable_t *rbs_ast_members_class_variable_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_ast_comment_t *comment, rbs_location_range name_range, rbs_location_range colon_range) {
|
|
668
730
|
rbs_ast_members_class_variable_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_class_variable_t);
|
|
669
731
|
|
|
670
732
|
*instance = (rbs_ast_members_class_variable_t) {
|
|
@@ -675,12 +737,15 @@ rbs_ast_members_class_variable_t *rbs_ast_members_class_variable_new(rbs_allocat
|
|
|
675
737
|
.name = name,
|
|
676
738
|
.type = type,
|
|
677
739
|
.comment = comment,
|
|
740
|
+
.name_range = name_range,
|
|
741
|
+
.colon_range = colon_range,
|
|
742
|
+
.kind_range = RBS_LOCATION_NULL_RANGE,
|
|
678
743
|
};
|
|
679
744
|
|
|
680
745
|
return instance;
|
|
681
746
|
}
|
|
682
|
-
#line
|
|
683
|
-
rbs_ast_members_extend_t *rbs_ast_members_extend_new(rbs_allocator_t *allocator,
|
|
747
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
748
|
+
rbs_ast_members_extend_t *rbs_ast_members_extend_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *name, rbs_node_list_t *args, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, rbs_location_range name_range, rbs_location_range keyword_range) {
|
|
684
749
|
rbs_ast_members_extend_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_extend_t);
|
|
685
750
|
|
|
686
751
|
*instance = (rbs_ast_members_extend_t) {
|
|
@@ -692,12 +757,15 @@ rbs_ast_members_extend_t *rbs_ast_members_extend_new(rbs_allocator_t *allocator,
|
|
|
692
757
|
.args = args,
|
|
693
758
|
.annotations = annotations,
|
|
694
759
|
.comment = comment,
|
|
760
|
+
.name_range = name_range,
|
|
761
|
+
.keyword_range = keyword_range,
|
|
762
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
695
763
|
};
|
|
696
764
|
|
|
697
765
|
return instance;
|
|
698
766
|
}
|
|
699
|
-
#line
|
|
700
|
-
rbs_ast_members_include_t *rbs_ast_members_include_new(rbs_allocator_t *allocator,
|
|
767
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
768
|
+
rbs_ast_members_include_t *rbs_ast_members_include_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *name, rbs_node_list_t *args, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, rbs_location_range name_range, rbs_location_range keyword_range) {
|
|
701
769
|
rbs_ast_members_include_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_include_t);
|
|
702
770
|
|
|
703
771
|
*instance = (rbs_ast_members_include_t) {
|
|
@@ -709,12 +777,15 @@ rbs_ast_members_include_t *rbs_ast_members_include_new(rbs_allocator_t *allocato
|
|
|
709
777
|
.args = args,
|
|
710
778
|
.annotations = annotations,
|
|
711
779
|
.comment = comment,
|
|
780
|
+
.name_range = name_range,
|
|
781
|
+
.keyword_range = keyword_range,
|
|
782
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
712
783
|
};
|
|
713
784
|
|
|
714
785
|
return instance;
|
|
715
786
|
}
|
|
716
|
-
#line
|
|
717
|
-
rbs_ast_members_instance_variable_t *rbs_ast_members_instance_variable_new(rbs_allocator_t *allocator,
|
|
787
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
788
|
+
rbs_ast_members_instance_variable_t *rbs_ast_members_instance_variable_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_ast_comment_t *comment, rbs_location_range name_range, rbs_location_range colon_range) {
|
|
718
789
|
rbs_ast_members_instance_variable_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_instance_variable_t);
|
|
719
790
|
|
|
720
791
|
*instance = (rbs_ast_members_instance_variable_t) {
|
|
@@ -725,12 +796,15 @@ rbs_ast_members_instance_variable_t *rbs_ast_members_instance_variable_new(rbs_a
|
|
|
725
796
|
.name = name,
|
|
726
797
|
.type = type,
|
|
727
798
|
.comment = comment,
|
|
799
|
+
.name_range = name_range,
|
|
800
|
+
.colon_range = colon_range,
|
|
801
|
+
.kind_range = RBS_LOCATION_NULL_RANGE,
|
|
728
802
|
};
|
|
729
803
|
|
|
730
804
|
return instance;
|
|
731
805
|
}
|
|
732
|
-
#line
|
|
733
|
-
rbs_ast_members_method_definition_t *rbs_ast_members_method_definition_new(rbs_allocator_t *allocator,
|
|
806
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
807
|
+
rbs_ast_members_method_definition_t *rbs_ast_members_method_definition_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_ast_symbol_t *name, enum rbs_method_definition_kind kind, rbs_node_list_t *overloads, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, bool overloading, enum rbs_method_definition_visibility visibility, rbs_location_range keyword_range, rbs_location_range name_range) {
|
|
734
808
|
rbs_ast_members_method_definition_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_method_definition_t);
|
|
735
809
|
|
|
736
810
|
*instance = (rbs_ast_members_method_definition_t) {
|
|
@@ -745,12 +819,17 @@ rbs_ast_members_method_definition_t *rbs_ast_members_method_definition_new(rbs_a
|
|
|
745
819
|
.comment = comment,
|
|
746
820
|
.overloading = overloading,
|
|
747
821
|
.visibility = visibility,
|
|
822
|
+
.keyword_range = keyword_range,
|
|
823
|
+
.name_range = name_range,
|
|
824
|
+
.kind_range = RBS_LOCATION_NULL_RANGE,
|
|
825
|
+
.overloading_range = RBS_LOCATION_NULL_RANGE,
|
|
826
|
+
.visibility_range = RBS_LOCATION_NULL_RANGE,
|
|
748
827
|
};
|
|
749
828
|
|
|
750
829
|
return instance;
|
|
751
830
|
}
|
|
752
|
-
#line
|
|
753
|
-
rbs_ast_members_method_definition_overload_t *rbs_ast_members_method_definition_overload_new(rbs_allocator_t *allocator,
|
|
831
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
832
|
+
rbs_ast_members_method_definition_overload_t *rbs_ast_members_method_definition_overload_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_list_t *annotations, rbs_node_t *method_type) {
|
|
754
833
|
rbs_ast_members_method_definition_overload_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_method_definition_overload_t);
|
|
755
834
|
|
|
756
835
|
*instance = (rbs_ast_members_method_definition_overload_t) {
|
|
@@ -764,8 +843,8 @@ rbs_ast_members_method_definition_overload_t *rbs_ast_members_method_definition_
|
|
|
764
843
|
|
|
765
844
|
return instance;
|
|
766
845
|
}
|
|
767
|
-
#line
|
|
768
|
-
rbs_ast_members_prepend_t *rbs_ast_members_prepend_new(rbs_allocator_t *allocator,
|
|
846
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
847
|
+
rbs_ast_members_prepend_t *rbs_ast_members_prepend_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *name, rbs_node_list_t *args, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, rbs_location_range name_range, rbs_location_range keyword_range) {
|
|
769
848
|
rbs_ast_members_prepend_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_prepend_t);
|
|
770
849
|
|
|
771
850
|
*instance = (rbs_ast_members_prepend_t) {
|
|
@@ -777,12 +856,15 @@ rbs_ast_members_prepend_t *rbs_ast_members_prepend_new(rbs_allocator_t *allocato
|
|
|
777
856
|
.args = args,
|
|
778
857
|
.annotations = annotations,
|
|
779
858
|
.comment = comment,
|
|
859
|
+
.name_range = name_range,
|
|
860
|
+
.keyword_range = keyword_range,
|
|
861
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
780
862
|
};
|
|
781
863
|
|
|
782
864
|
return instance;
|
|
783
865
|
}
|
|
784
|
-
#line
|
|
785
|
-
rbs_ast_members_private_t *rbs_ast_members_private_new(rbs_allocator_t *allocator,
|
|
866
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
867
|
+
rbs_ast_members_private_t *rbs_ast_members_private_new(rbs_allocator_t *allocator, rbs_location_range location) {
|
|
786
868
|
rbs_ast_members_private_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_private_t);
|
|
787
869
|
|
|
788
870
|
*instance = (rbs_ast_members_private_t) {
|
|
@@ -794,8 +876,8 @@ rbs_ast_members_private_t *rbs_ast_members_private_new(rbs_allocator_t *allocato
|
|
|
794
876
|
|
|
795
877
|
return instance;
|
|
796
878
|
}
|
|
797
|
-
#line
|
|
798
|
-
rbs_ast_members_public_t *rbs_ast_members_public_new(rbs_allocator_t *allocator,
|
|
879
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
880
|
+
rbs_ast_members_public_t *rbs_ast_members_public_new(rbs_allocator_t *allocator, rbs_location_range location) {
|
|
799
881
|
rbs_ast_members_public_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_public_t);
|
|
800
882
|
|
|
801
883
|
*instance = (rbs_ast_members_public_t) {
|
|
@@ -807,8 +889,29 @@ rbs_ast_members_public_t *rbs_ast_members_public_new(rbs_allocator_t *allocator,
|
|
|
807
889
|
|
|
808
890
|
return instance;
|
|
809
891
|
}
|
|
810
|
-
#line
|
|
811
|
-
|
|
892
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
893
|
+
rbs_ast_ruby_annotations_block_param_type_annotation_t *rbs_ast_ruby_annotations_block_param_type_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range ampersand_location, rbs_location_range name_location, rbs_location_range colon_location, rbs_location_range question_location, rbs_location_range type_location, rbs_node_t *type_, rbs_location_range comment_location) {
|
|
894
|
+
rbs_ast_ruby_annotations_block_param_type_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_block_param_type_annotation_t);
|
|
895
|
+
|
|
896
|
+
*instance = (rbs_ast_ruby_annotations_block_param_type_annotation_t) {
|
|
897
|
+
.base = (rbs_node_t) {
|
|
898
|
+
.type = RBS_AST_RUBY_ANNOTATIONS_BLOCK_PARAM_TYPE_ANNOTATION,
|
|
899
|
+
.location = location,
|
|
900
|
+
},
|
|
901
|
+
.prefix_location = prefix_location,
|
|
902
|
+
.ampersand_location = ampersand_location,
|
|
903
|
+
.name_location = name_location,
|
|
904
|
+
.colon_location = colon_location,
|
|
905
|
+
.question_location = question_location,
|
|
906
|
+
.type_location = type_location,
|
|
907
|
+
.type_ = type_,
|
|
908
|
+
.comment_location = comment_location,
|
|
909
|
+
};
|
|
910
|
+
|
|
911
|
+
return instance;
|
|
912
|
+
}
|
|
913
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
914
|
+
rbs_ast_ruby_annotations_class_alias_annotation_t *rbs_ast_ruby_annotations_class_alias_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range keyword_location, rbs_type_name_t *type_name, rbs_location_range type_name_location) {
|
|
812
915
|
rbs_ast_ruby_annotations_class_alias_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_class_alias_annotation_t);
|
|
813
916
|
|
|
814
917
|
*instance = (rbs_ast_ruby_annotations_class_alias_annotation_t) {
|
|
@@ -824,8 +927,8 @@ rbs_ast_ruby_annotations_class_alias_annotation_t *rbs_ast_ruby_annotations_clas
|
|
|
824
927
|
|
|
825
928
|
return instance;
|
|
826
929
|
}
|
|
827
|
-
#line
|
|
828
|
-
rbs_ast_ruby_annotations_colon_method_type_annotation_t *rbs_ast_ruby_annotations_colon_method_type_annotation_new(rbs_allocator_t *allocator,
|
|
930
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
931
|
+
rbs_ast_ruby_annotations_colon_method_type_annotation_t *rbs_ast_ruby_annotations_colon_method_type_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_node_list_t *annotations, rbs_node_t *method_type) {
|
|
829
932
|
rbs_ast_ruby_annotations_colon_method_type_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_colon_method_type_annotation_t);
|
|
830
933
|
|
|
831
934
|
*instance = (rbs_ast_ruby_annotations_colon_method_type_annotation_t) {
|
|
@@ -840,8 +943,27 @@ rbs_ast_ruby_annotations_colon_method_type_annotation_t *rbs_ast_ruby_annotation
|
|
|
840
943
|
|
|
841
944
|
return instance;
|
|
842
945
|
}
|
|
843
|
-
#line
|
|
844
|
-
|
|
946
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
947
|
+
rbs_ast_ruby_annotations_double_splat_param_type_annotation_t *rbs_ast_ruby_annotations_double_splat_param_type_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range star2_location, rbs_location_range name_location, rbs_location_range colon_location, rbs_node_t *param_type, rbs_location_range comment_location) {
|
|
948
|
+
rbs_ast_ruby_annotations_double_splat_param_type_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_double_splat_param_type_annotation_t);
|
|
949
|
+
|
|
950
|
+
*instance = (rbs_ast_ruby_annotations_double_splat_param_type_annotation_t) {
|
|
951
|
+
.base = (rbs_node_t) {
|
|
952
|
+
.type = RBS_AST_RUBY_ANNOTATIONS_DOUBLE_SPLAT_PARAM_TYPE_ANNOTATION,
|
|
953
|
+
.location = location,
|
|
954
|
+
},
|
|
955
|
+
.prefix_location = prefix_location,
|
|
956
|
+
.star2_location = star2_location,
|
|
957
|
+
.name_location = name_location,
|
|
958
|
+
.colon_location = colon_location,
|
|
959
|
+
.param_type = param_type,
|
|
960
|
+
.comment_location = comment_location,
|
|
961
|
+
};
|
|
962
|
+
|
|
963
|
+
return instance;
|
|
964
|
+
}
|
|
965
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
966
|
+
rbs_ast_ruby_annotations_instance_variable_annotation_t *rbs_ast_ruby_annotations_instance_variable_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_ast_symbol_t *ivar_name, rbs_location_range ivar_name_location, rbs_location_range colon_location, rbs_node_t *type, rbs_location_range comment_location) {
|
|
845
967
|
rbs_ast_ruby_annotations_instance_variable_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_instance_variable_annotation_t);
|
|
846
968
|
|
|
847
969
|
*instance = (rbs_ast_ruby_annotations_instance_variable_annotation_t) {
|
|
@@ -859,8 +981,8 @@ rbs_ast_ruby_annotations_instance_variable_annotation_t *rbs_ast_ruby_annotation
|
|
|
859
981
|
|
|
860
982
|
return instance;
|
|
861
983
|
}
|
|
862
|
-
#line
|
|
863
|
-
rbs_ast_ruby_annotations_method_types_annotation_t *rbs_ast_ruby_annotations_method_types_annotation_new(rbs_allocator_t *allocator,
|
|
984
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
985
|
+
rbs_ast_ruby_annotations_method_types_annotation_t *rbs_ast_ruby_annotations_method_types_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_node_list_t *overloads, rbs_location_range_list_t *vertical_bar_locations, rbs_location_range dot3_location) {
|
|
864
986
|
rbs_ast_ruby_annotations_method_types_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_method_types_annotation_t);
|
|
865
987
|
|
|
866
988
|
*instance = (rbs_ast_ruby_annotations_method_types_annotation_t) {
|
|
@@ -871,12 +993,13 @@ rbs_ast_ruby_annotations_method_types_annotation_t *rbs_ast_ruby_annotations_met
|
|
|
871
993
|
.prefix_location = prefix_location,
|
|
872
994
|
.overloads = overloads,
|
|
873
995
|
.vertical_bar_locations = vertical_bar_locations,
|
|
996
|
+
.dot3_location = dot3_location,
|
|
874
997
|
};
|
|
875
998
|
|
|
876
999
|
return instance;
|
|
877
1000
|
}
|
|
878
|
-
#line
|
|
879
|
-
rbs_ast_ruby_annotations_module_alias_annotation_t *rbs_ast_ruby_annotations_module_alias_annotation_new(rbs_allocator_t *allocator,
|
|
1001
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1002
|
+
rbs_ast_ruby_annotations_module_alias_annotation_t *rbs_ast_ruby_annotations_module_alias_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range keyword_location, rbs_type_name_t *type_name, rbs_location_range type_name_location) {
|
|
880
1003
|
rbs_ast_ruby_annotations_module_alias_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_module_alias_annotation_t);
|
|
881
1004
|
|
|
882
1005
|
*instance = (rbs_ast_ruby_annotations_module_alias_annotation_t) {
|
|
@@ -892,8 +1015,8 @@ rbs_ast_ruby_annotations_module_alias_annotation_t *rbs_ast_ruby_annotations_mod
|
|
|
892
1015
|
|
|
893
1016
|
return instance;
|
|
894
1017
|
}
|
|
895
|
-
#line
|
|
896
|
-
rbs_ast_ruby_annotations_node_type_assertion_t *rbs_ast_ruby_annotations_node_type_assertion_new(rbs_allocator_t *allocator,
|
|
1018
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1019
|
+
rbs_ast_ruby_annotations_node_type_assertion_t *rbs_ast_ruby_annotations_node_type_assertion_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_node_t *type) {
|
|
897
1020
|
rbs_ast_ruby_annotations_node_type_assertion_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_node_type_assertion_t);
|
|
898
1021
|
|
|
899
1022
|
*instance = (rbs_ast_ruby_annotations_node_type_assertion_t) {
|
|
@@ -907,8 +1030,26 @@ rbs_ast_ruby_annotations_node_type_assertion_t *rbs_ast_ruby_annotations_node_ty
|
|
|
907
1030
|
|
|
908
1031
|
return instance;
|
|
909
1032
|
}
|
|
910
|
-
#line
|
|
911
|
-
|
|
1033
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1034
|
+
rbs_ast_ruby_annotations_param_type_annotation_t *rbs_ast_ruby_annotations_param_type_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range name_location, rbs_location_range colon_location, rbs_node_t *param_type, rbs_location_range comment_location) {
|
|
1035
|
+
rbs_ast_ruby_annotations_param_type_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_param_type_annotation_t);
|
|
1036
|
+
|
|
1037
|
+
*instance = (rbs_ast_ruby_annotations_param_type_annotation_t) {
|
|
1038
|
+
.base = (rbs_node_t) {
|
|
1039
|
+
.type = RBS_AST_RUBY_ANNOTATIONS_PARAM_TYPE_ANNOTATION,
|
|
1040
|
+
.location = location,
|
|
1041
|
+
},
|
|
1042
|
+
.prefix_location = prefix_location,
|
|
1043
|
+
.name_location = name_location,
|
|
1044
|
+
.colon_location = colon_location,
|
|
1045
|
+
.param_type = param_type,
|
|
1046
|
+
.comment_location = comment_location,
|
|
1047
|
+
};
|
|
1048
|
+
|
|
1049
|
+
return instance;
|
|
1050
|
+
}
|
|
1051
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1052
|
+
rbs_ast_ruby_annotations_return_type_annotation_t *rbs_ast_ruby_annotations_return_type_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range return_location, rbs_location_range colon_location, rbs_node_t *return_type, rbs_location_range comment_location) {
|
|
912
1053
|
rbs_ast_ruby_annotations_return_type_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_return_type_annotation_t);
|
|
913
1054
|
|
|
914
1055
|
*instance = (rbs_ast_ruby_annotations_return_type_annotation_t) {
|
|
@@ -925,8 +1066,8 @@ rbs_ast_ruby_annotations_return_type_annotation_t *rbs_ast_ruby_annotations_retu
|
|
|
925
1066
|
|
|
926
1067
|
return instance;
|
|
927
1068
|
}
|
|
928
|
-
#line
|
|
929
|
-
rbs_ast_ruby_annotations_skip_annotation_t *rbs_ast_ruby_annotations_skip_annotation_new(rbs_allocator_t *allocator,
|
|
1069
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1070
|
+
rbs_ast_ruby_annotations_skip_annotation_t *rbs_ast_ruby_annotations_skip_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range skip_location, rbs_location_range comment_location) {
|
|
930
1071
|
rbs_ast_ruby_annotations_skip_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_skip_annotation_t);
|
|
931
1072
|
|
|
932
1073
|
*instance = (rbs_ast_ruby_annotations_skip_annotation_t) {
|
|
@@ -941,8 +1082,27 @@ rbs_ast_ruby_annotations_skip_annotation_t *rbs_ast_ruby_annotations_skip_annota
|
|
|
941
1082
|
|
|
942
1083
|
return instance;
|
|
943
1084
|
}
|
|
944
|
-
#line
|
|
945
|
-
|
|
1085
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1086
|
+
rbs_ast_ruby_annotations_splat_param_type_annotation_t *rbs_ast_ruby_annotations_splat_param_type_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range star_location, rbs_location_range name_location, rbs_location_range colon_location, rbs_node_t *param_type, rbs_location_range comment_location) {
|
|
1087
|
+
rbs_ast_ruby_annotations_splat_param_type_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_splat_param_type_annotation_t);
|
|
1088
|
+
|
|
1089
|
+
*instance = (rbs_ast_ruby_annotations_splat_param_type_annotation_t) {
|
|
1090
|
+
.base = (rbs_node_t) {
|
|
1091
|
+
.type = RBS_AST_RUBY_ANNOTATIONS_SPLAT_PARAM_TYPE_ANNOTATION,
|
|
1092
|
+
.location = location,
|
|
1093
|
+
},
|
|
1094
|
+
.prefix_location = prefix_location,
|
|
1095
|
+
.star_location = star_location,
|
|
1096
|
+
.name_location = name_location,
|
|
1097
|
+
.colon_location = colon_location,
|
|
1098
|
+
.param_type = param_type,
|
|
1099
|
+
.comment_location = comment_location,
|
|
1100
|
+
};
|
|
1101
|
+
|
|
1102
|
+
return instance;
|
|
1103
|
+
}
|
|
1104
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1105
|
+
rbs_ast_ruby_annotations_type_application_annotation_t *rbs_ast_ruby_annotations_type_application_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_node_list_t *type_args, rbs_location_range close_bracket_location, rbs_location_range_list_t *comma_locations) {
|
|
946
1106
|
rbs_ast_ruby_annotations_type_application_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_type_application_annotation_t);
|
|
947
1107
|
|
|
948
1108
|
*instance = (rbs_ast_ruby_annotations_type_application_annotation_t) {
|
|
@@ -958,8 +1118,8 @@ rbs_ast_ruby_annotations_type_application_annotation_t *rbs_ast_ruby_annotations
|
|
|
958
1118
|
|
|
959
1119
|
return instance;
|
|
960
1120
|
}
|
|
961
|
-
#line
|
|
962
|
-
rbs_ast_string_t *rbs_ast_string_new(rbs_allocator_t *allocator,
|
|
1121
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1122
|
+
rbs_ast_string_t *rbs_ast_string_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_string_t string) {
|
|
963
1123
|
rbs_ast_string_t *instance = rbs_allocator_alloc(allocator, rbs_ast_string_t);
|
|
964
1124
|
|
|
965
1125
|
*instance = (rbs_ast_string_t) {
|
|
@@ -972,8 +1132,8 @@ rbs_ast_string_t *rbs_ast_string_new(rbs_allocator_t *allocator, rbs_location_t
|
|
|
972
1132
|
|
|
973
1133
|
return instance;
|
|
974
1134
|
}
|
|
975
|
-
#line
|
|
976
|
-
rbs_ast_type_param_t *rbs_ast_type_param_new(rbs_allocator_t *allocator,
|
|
1135
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1136
|
+
rbs_ast_type_param_t *rbs_ast_type_param_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_ast_symbol_t *name, enum rbs_type_param_variance variance, rbs_node_t *upper_bound, rbs_node_t *lower_bound, rbs_node_t *default_type, bool unchecked, rbs_location_range name_range) {
|
|
977
1137
|
rbs_ast_type_param_t *instance = rbs_allocator_alloc(allocator, rbs_ast_type_param_t);
|
|
978
1138
|
|
|
979
1139
|
*instance = (rbs_ast_type_param_t) {
|
|
@@ -987,12 +1147,18 @@ rbs_ast_type_param_t *rbs_ast_type_param_new(rbs_allocator_t *allocator, rbs_loc
|
|
|
987
1147
|
.lower_bound = lower_bound,
|
|
988
1148
|
.default_type = default_type,
|
|
989
1149
|
.unchecked = unchecked,
|
|
1150
|
+
.name_range = name_range,
|
|
1151
|
+
.variance_range = RBS_LOCATION_NULL_RANGE,
|
|
1152
|
+
.unchecked_range = RBS_LOCATION_NULL_RANGE,
|
|
1153
|
+
.upper_bound_range = RBS_LOCATION_NULL_RANGE,
|
|
1154
|
+
.lower_bound_range = RBS_LOCATION_NULL_RANGE,
|
|
1155
|
+
.default_range = RBS_LOCATION_NULL_RANGE,
|
|
990
1156
|
};
|
|
991
1157
|
|
|
992
1158
|
return instance;
|
|
993
1159
|
}
|
|
994
|
-
#line
|
|
995
|
-
rbs_method_type_t *rbs_method_type_new(rbs_allocator_t *allocator,
|
|
1160
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1161
|
+
rbs_method_type_t *rbs_method_type_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_list_t *type_params, rbs_node_t *type, rbs_types_block_t *block, rbs_location_range type_range) {
|
|
996
1162
|
rbs_method_type_t *instance = rbs_allocator_alloc(allocator, rbs_method_type_t);
|
|
997
1163
|
|
|
998
1164
|
*instance = (rbs_method_type_t) {
|
|
@@ -1003,12 +1169,14 @@ rbs_method_type_t *rbs_method_type_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
1003
1169
|
.type_params = type_params,
|
|
1004
1170
|
.type = type,
|
|
1005
1171
|
.block = block,
|
|
1172
|
+
.type_range = type_range,
|
|
1173
|
+
.type_params_range = RBS_LOCATION_NULL_RANGE,
|
|
1006
1174
|
};
|
|
1007
1175
|
|
|
1008
1176
|
return instance;
|
|
1009
1177
|
}
|
|
1010
|
-
#line
|
|
1011
|
-
rbs_namespace_t *rbs_namespace_new(rbs_allocator_t *allocator,
|
|
1178
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1179
|
+
rbs_namespace_t *rbs_namespace_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_list_t *path, bool absolute) {
|
|
1012
1180
|
rbs_namespace_t *instance = rbs_allocator_alloc(allocator, rbs_namespace_t);
|
|
1013
1181
|
|
|
1014
1182
|
*instance = (rbs_namespace_t) {
|
|
@@ -1022,8 +1190,8 @@ rbs_namespace_t *rbs_namespace_new(rbs_allocator_t *allocator, rbs_location_t *l
|
|
|
1022
1190
|
|
|
1023
1191
|
return instance;
|
|
1024
1192
|
}
|
|
1025
|
-
#line
|
|
1026
|
-
rbs_signature_t *rbs_signature_new(rbs_allocator_t *allocator,
|
|
1193
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1194
|
+
rbs_signature_t *rbs_signature_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_list_t *directives, rbs_node_list_t *declarations) {
|
|
1027
1195
|
rbs_signature_t *instance = rbs_allocator_alloc(allocator, rbs_signature_t);
|
|
1028
1196
|
|
|
1029
1197
|
*instance = (rbs_signature_t) {
|
|
@@ -1037,8 +1205,8 @@ rbs_signature_t *rbs_signature_new(rbs_allocator_t *allocator, rbs_location_t *l
|
|
|
1037
1205
|
|
|
1038
1206
|
return instance;
|
|
1039
1207
|
}
|
|
1040
|
-
#line
|
|
1041
|
-
rbs_type_name_t *rbs_type_name_new(rbs_allocator_t *allocator,
|
|
1208
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1209
|
+
rbs_type_name_t *rbs_type_name_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_namespace_t *rbs_namespace, rbs_ast_symbol_t *name) {
|
|
1042
1210
|
rbs_type_name_t *instance = rbs_allocator_alloc(allocator, rbs_type_name_t);
|
|
1043
1211
|
|
|
1044
1212
|
*instance = (rbs_type_name_t) {
|
|
@@ -1052,8 +1220,8 @@ rbs_type_name_t *rbs_type_name_new(rbs_allocator_t *allocator, rbs_location_t *l
|
|
|
1052
1220
|
|
|
1053
1221
|
return instance;
|
|
1054
1222
|
}
|
|
1055
|
-
#line
|
|
1056
|
-
rbs_types_alias_t *rbs_types_alias_new(rbs_allocator_t *allocator,
|
|
1223
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1224
|
+
rbs_types_alias_t *rbs_types_alias_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *name, rbs_node_list_t *args, rbs_location_range name_range) {
|
|
1057
1225
|
rbs_types_alias_t *instance = rbs_allocator_alloc(allocator, rbs_types_alias_t);
|
|
1058
1226
|
|
|
1059
1227
|
*instance = (rbs_types_alias_t) {
|
|
@@ -1063,12 +1231,14 @@ rbs_types_alias_t *rbs_types_alias_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
1063
1231
|
},
|
|
1064
1232
|
.name = name,
|
|
1065
1233
|
.args = args,
|
|
1234
|
+
.name_range = name_range,
|
|
1235
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
1066
1236
|
};
|
|
1067
1237
|
|
|
1068
1238
|
return instance;
|
|
1069
1239
|
}
|
|
1070
|
-
#line
|
|
1071
|
-
rbs_types_bases_any_t *rbs_types_bases_any_new(rbs_allocator_t *allocator,
|
|
1240
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1241
|
+
rbs_types_bases_any_t *rbs_types_bases_any_new(rbs_allocator_t *allocator, rbs_location_range location, bool todo) {
|
|
1072
1242
|
rbs_types_bases_any_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_any_t);
|
|
1073
1243
|
|
|
1074
1244
|
*instance = (rbs_types_bases_any_t) {
|
|
@@ -1081,8 +1251,8 @@ rbs_types_bases_any_t *rbs_types_bases_any_new(rbs_allocator_t *allocator, rbs_l
|
|
|
1081
1251
|
|
|
1082
1252
|
return instance;
|
|
1083
1253
|
}
|
|
1084
|
-
#line
|
|
1085
|
-
rbs_types_bases_bool_t *rbs_types_bases_bool_new(rbs_allocator_t *allocator,
|
|
1254
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1255
|
+
rbs_types_bases_bool_t *rbs_types_bases_bool_new(rbs_allocator_t *allocator, rbs_location_range location) {
|
|
1086
1256
|
rbs_types_bases_bool_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_bool_t);
|
|
1087
1257
|
|
|
1088
1258
|
*instance = (rbs_types_bases_bool_t) {
|
|
@@ -1094,8 +1264,8 @@ rbs_types_bases_bool_t *rbs_types_bases_bool_new(rbs_allocator_t *allocator, rbs
|
|
|
1094
1264
|
|
|
1095
1265
|
return instance;
|
|
1096
1266
|
}
|
|
1097
|
-
#line
|
|
1098
|
-
rbs_types_bases_bottom_t *rbs_types_bases_bottom_new(rbs_allocator_t *allocator,
|
|
1267
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1268
|
+
rbs_types_bases_bottom_t *rbs_types_bases_bottom_new(rbs_allocator_t *allocator, rbs_location_range location) {
|
|
1099
1269
|
rbs_types_bases_bottom_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_bottom_t);
|
|
1100
1270
|
|
|
1101
1271
|
*instance = (rbs_types_bases_bottom_t) {
|
|
@@ -1107,8 +1277,8 @@ rbs_types_bases_bottom_t *rbs_types_bases_bottom_new(rbs_allocator_t *allocator,
|
|
|
1107
1277
|
|
|
1108
1278
|
return instance;
|
|
1109
1279
|
}
|
|
1110
|
-
#line
|
|
1111
|
-
rbs_types_bases_class_t *rbs_types_bases_class_new(rbs_allocator_t *allocator,
|
|
1280
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1281
|
+
rbs_types_bases_class_t *rbs_types_bases_class_new(rbs_allocator_t *allocator, rbs_location_range location) {
|
|
1112
1282
|
rbs_types_bases_class_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_class_t);
|
|
1113
1283
|
|
|
1114
1284
|
*instance = (rbs_types_bases_class_t) {
|
|
@@ -1120,8 +1290,8 @@ rbs_types_bases_class_t *rbs_types_bases_class_new(rbs_allocator_t *allocator, r
|
|
|
1120
1290
|
|
|
1121
1291
|
return instance;
|
|
1122
1292
|
}
|
|
1123
|
-
#line
|
|
1124
|
-
rbs_types_bases_instance_t *rbs_types_bases_instance_new(rbs_allocator_t *allocator,
|
|
1293
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1294
|
+
rbs_types_bases_instance_t *rbs_types_bases_instance_new(rbs_allocator_t *allocator, rbs_location_range location) {
|
|
1125
1295
|
rbs_types_bases_instance_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_instance_t);
|
|
1126
1296
|
|
|
1127
1297
|
*instance = (rbs_types_bases_instance_t) {
|
|
@@ -1133,8 +1303,8 @@ rbs_types_bases_instance_t *rbs_types_bases_instance_new(rbs_allocator_t *alloca
|
|
|
1133
1303
|
|
|
1134
1304
|
return instance;
|
|
1135
1305
|
}
|
|
1136
|
-
#line
|
|
1137
|
-
rbs_types_bases_nil_t *rbs_types_bases_nil_new(rbs_allocator_t *allocator,
|
|
1306
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1307
|
+
rbs_types_bases_nil_t *rbs_types_bases_nil_new(rbs_allocator_t *allocator, rbs_location_range location) {
|
|
1138
1308
|
rbs_types_bases_nil_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_nil_t);
|
|
1139
1309
|
|
|
1140
1310
|
*instance = (rbs_types_bases_nil_t) {
|
|
@@ -1146,8 +1316,8 @@ rbs_types_bases_nil_t *rbs_types_bases_nil_new(rbs_allocator_t *allocator, rbs_l
|
|
|
1146
1316
|
|
|
1147
1317
|
return instance;
|
|
1148
1318
|
}
|
|
1149
|
-
#line
|
|
1150
|
-
rbs_types_bases_self_t *rbs_types_bases_self_new(rbs_allocator_t *allocator,
|
|
1319
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1320
|
+
rbs_types_bases_self_t *rbs_types_bases_self_new(rbs_allocator_t *allocator, rbs_location_range location) {
|
|
1151
1321
|
rbs_types_bases_self_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_self_t);
|
|
1152
1322
|
|
|
1153
1323
|
*instance = (rbs_types_bases_self_t) {
|
|
@@ -1159,8 +1329,8 @@ rbs_types_bases_self_t *rbs_types_bases_self_new(rbs_allocator_t *allocator, rbs
|
|
|
1159
1329
|
|
|
1160
1330
|
return instance;
|
|
1161
1331
|
}
|
|
1162
|
-
#line
|
|
1163
|
-
rbs_types_bases_top_t *rbs_types_bases_top_new(rbs_allocator_t *allocator,
|
|
1332
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1333
|
+
rbs_types_bases_top_t *rbs_types_bases_top_new(rbs_allocator_t *allocator, rbs_location_range location) {
|
|
1164
1334
|
rbs_types_bases_top_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_top_t);
|
|
1165
1335
|
|
|
1166
1336
|
*instance = (rbs_types_bases_top_t) {
|
|
@@ -1172,8 +1342,8 @@ rbs_types_bases_top_t *rbs_types_bases_top_new(rbs_allocator_t *allocator, rbs_l
|
|
|
1172
1342
|
|
|
1173
1343
|
return instance;
|
|
1174
1344
|
}
|
|
1175
|
-
#line
|
|
1176
|
-
rbs_types_bases_void_t *rbs_types_bases_void_new(rbs_allocator_t *allocator,
|
|
1345
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1346
|
+
rbs_types_bases_void_t *rbs_types_bases_void_new(rbs_allocator_t *allocator, rbs_location_range location) {
|
|
1177
1347
|
rbs_types_bases_void_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_void_t);
|
|
1178
1348
|
|
|
1179
1349
|
*instance = (rbs_types_bases_void_t) {
|
|
@@ -1185,8 +1355,8 @@ rbs_types_bases_void_t *rbs_types_bases_void_new(rbs_allocator_t *allocator, rbs
|
|
|
1185
1355
|
|
|
1186
1356
|
return instance;
|
|
1187
1357
|
}
|
|
1188
|
-
#line
|
|
1189
|
-
rbs_types_block_t *rbs_types_block_new(rbs_allocator_t *allocator,
|
|
1358
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1359
|
+
rbs_types_block_t *rbs_types_block_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_t *type, bool required, rbs_node_t *self_type) {
|
|
1190
1360
|
rbs_types_block_t *instance = rbs_allocator_alloc(allocator, rbs_types_block_t);
|
|
1191
1361
|
|
|
1192
1362
|
*instance = (rbs_types_block_t) {
|
|
@@ -1201,8 +1371,8 @@ rbs_types_block_t *rbs_types_block_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
1201
1371
|
|
|
1202
1372
|
return instance;
|
|
1203
1373
|
}
|
|
1204
|
-
#line
|
|
1205
|
-
rbs_types_class_instance_t *rbs_types_class_instance_new(rbs_allocator_t *allocator,
|
|
1374
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1375
|
+
rbs_types_class_instance_t *rbs_types_class_instance_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *name, rbs_node_list_t *args, rbs_location_range name_range) {
|
|
1206
1376
|
rbs_types_class_instance_t *instance = rbs_allocator_alloc(allocator, rbs_types_class_instance_t);
|
|
1207
1377
|
|
|
1208
1378
|
*instance = (rbs_types_class_instance_t) {
|
|
@@ -1212,12 +1382,14 @@ rbs_types_class_instance_t *rbs_types_class_instance_new(rbs_allocator_t *alloca
|
|
|
1212
1382
|
},
|
|
1213
1383
|
.name = name,
|
|
1214
1384
|
.args = args,
|
|
1385
|
+
.name_range = name_range,
|
|
1386
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
1215
1387
|
};
|
|
1216
1388
|
|
|
1217
1389
|
return instance;
|
|
1218
1390
|
}
|
|
1219
|
-
#line
|
|
1220
|
-
rbs_types_class_singleton_t *rbs_types_class_singleton_new(rbs_allocator_t *allocator,
|
|
1391
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1392
|
+
rbs_types_class_singleton_t *rbs_types_class_singleton_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *name, rbs_node_list_t *args, rbs_location_range name_range) {
|
|
1221
1393
|
rbs_types_class_singleton_t *instance = rbs_allocator_alloc(allocator, rbs_types_class_singleton_t);
|
|
1222
1394
|
|
|
1223
1395
|
*instance = (rbs_types_class_singleton_t) {
|
|
@@ -1226,12 +1398,15 @@ rbs_types_class_singleton_t *rbs_types_class_singleton_new(rbs_allocator_t *allo
|
|
|
1226
1398
|
.location = location,
|
|
1227
1399
|
},
|
|
1228
1400
|
.name = name,
|
|
1401
|
+
.args = args,
|
|
1402
|
+
.name_range = name_range,
|
|
1403
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
1229
1404
|
};
|
|
1230
1405
|
|
|
1231
1406
|
return instance;
|
|
1232
1407
|
}
|
|
1233
|
-
#line
|
|
1234
|
-
rbs_types_function_t *rbs_types_function_new(rbs_allocator_t *allocator,
|
|
1408
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1409
|
+
rbs_types_function_t *rbs_types_function_new(rbs_allocator_t *allocator, rbs_location_range 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) {
|
|
1235
1410
|
rbs_types_function_t *instance = rbs_allocator_alloc(allocator, rbs_types_function_t);
|
|
1236
1411
|
|
|
1237
1412
|
*instance = (rbs_types_function_t) {
|
|
@@ -1251,8 +1426,8 @@ rbs_types_function_t *rbs_types_function_new(rbs_allocator_t *allocator, rbs_loc
|
|
|
1251
1426
|
|
|
1252
1427
|
return instance;
|
|
1253
1428
|
}
|
|
1254
|
-
#line
|
|
1255
|
-
rbs_types_function_param_t *rbs_types_function_param_new(rbs_allocator_t *allocator,
|
|
1429
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1430
|
+
rbs_types_function_param_t *rbs_types_function_param_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_t *type, rbs_ast_symbol_t *name) {
|
|
1256
1431
|
rbs_types_function_param_t *instance = rbs_allocator_alloc(allocator, rbs_types_function_param_t);
|
|
1257
1432
|
|
|
1258
1433
|
*instance = (rbs_types_function_param_t) {
|
|
@@ -1262,12 +1437,13 @@ rbs_types_function_param_t *rbs_types_function_param_new(rbs_allocator_t *alloca
|
|
|
1262
1437
|
},
|
|
1263
1438
|
.type = type,
|
|
1264
1439
|
.name = name,
|
|
1440
|
+
.name_range = RBS_LOCATION_NULL_RANGE,
|
|
1265
1441
|
};
|
|
1266
1442
|
|
|
1267
1443
|
return instance;
|
|
1268
1444
|
}
|
|
1269
|
-
#line
|
|
1270
|
-
rbs_types_interface_t *rbs_types_interface_new(rbs_allocator_t *allocator,
|
|
1445
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1446
|
+
rbs_types_interface_t *rbs_types_interface_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *name, rbs_node_list_t *args, rbs_location_range name_range) {
|
|
1271
1447
|
rbs_types_interface_t *instance = rbs_allocator_alloc(allocator, rbs_types_interface_t);
|
|
1272
1448
|
|
|
1273
1449
|
*instance = (rbs_types_interface_t) {
|
|
@@ -1277,12 +1453,14 @@ rbs_types_interface_t *rbs_types_interface_new(rbs_allocator_t *allocator, rbs_l
|
|
|
1277
1453
|
},
|
|
1278
1454
|
.name = name,
|
|
1279
1455
|
.args = args,
|
|
1456
|
+
.name_range = name_range,
|
|
1457
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
1280
1458
|
};
|
|
1281
1459
|
|
|
1282
1460
|
return instance;
|
|
1283
1461
|
}
|
|
1284
|
-
#line
|
|
1285
|
-
rbs_types_intersection_t *rbs_types_intersection_new(rbs_allocator_t *allocator,
|
|
1462
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1463
|
+
rbs_types_intersection_t *rbs_types_intersection_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_list_t *types) {
|
|
1286
1464
|
rbs_types_intersection_t *instance = rbs_allocator_alloc(allocator, rbs_types_intersection_t);
|
|
1287
1465
|
|
|
1288
1466
|
*instance = (rbs_types_intersection_t) {
|
|
@@ -1295,8 +1473,8 @@ rbs_types_intersection_t *rbs_types_intersection_new(rbs_allocator_t *allocator,
|
|
|
1295
1473
|
|
|
1296
1474
|
return instance;
|
|
1297
1475
|
}
|
|
1298
|
-
#line
|
|
1299
|
-
rbs_types_literal_t *rbs_types_literal_new(rbs_allocator_t *allocator,
|
|
1476
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1477
|
+
rbs_types_literal_t *rbs_types_literal_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_t *literal) {
|
|
1300
1478
|
rbs_types_literal_t *instance = rbs_allocator_alloc(allocator, rbs_types_literal_t);
|
|
1301
1479
|
|
|
1302
1480
|
*instance = (rbs_types_literal_t) {
|
|
@@ -1309,8 +1487,8 @@ rbs_types_literal_t *rbs_types_literal_new(rbs_allocator_t *allocator, rbs_locat
|
|
|
1309
1487
|
|
|
1310
1488
|
return instance;
|
|
1311
1489
|
}
|
|
1312
|
-
#line
|
|
1313
|
-
rbs_types_optional_t *rbs_types_optional_new(rbs_allocator_t *allocator,
|
|
1490
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1491
|
+
rbs_types_optional_t *rbs_types_optional_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_t *type) {
|
|
1314
1492
|
rbs_types_optional_t *instance = rbs_allocator_alloc(allocator, rbs_types_optional_t);
|
|
1315
1493
|
|
|
1316
1494
|
*instance = (rbs_types_optional_t) {
|
|
@@ -1323,8 +1501,8 @@ rbs_types_optional_t *rbs_types_optional_new(rbs_allocator_t *allocator, rbs_loc
|
|
|
1323
1501
|
|
|
1324
1502
|
return instance;
|
|
1325
1503
|
}
|
|
1326
|
-
#line
|
|
1327
|
-
rbs_types_proc_t *rbs_types_proc_new(rbs_allocator_t *allocator,
|
|
1504
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1505
|
+
rbs_types_proc_t *rbs_types_proc_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_t *type, rbs_types_block_t *block, rbs_node_t *self_type) {
|
|
1328
1506
|
rbs_types_proc_t *instance = rbs_allocator_alloc(allocator, rbs_types_proc_t);
|
|
1329
1507
|
|
|
1330
1508
|
*instance = (rbs_types_proc_t) {
|
|
@@ -1339,8 +1517,8 @@ rbs_types_proc_t *rbs_types_proc_new(rbs_allocator_t *allocator, rbs_location_t
|
|
|
1339
1517
|
|
|
1340
1518
|
return instance;
|
|
1341
1519
|
}
|
|
1342
|
-
#line
|
|
1343
|
-
rbs_types_record_t *rbs_types_record_new(rbs_allocator_t *allocator,
|
|
1520
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1521
|
+
rbs_types_record_t *rbs_types_record_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_hash_t *all_fields) {
|
|
1344
1522
|
rbs_types_record_t *instance = rbs_allocator_alloc(allocator, rbs_types_record_t);
|
|
1345
1523
|
|
|
1346
1524
|
*instance = (rbs_types_record_t) {
|
|
@@ -1353,8 +1531,8 @@ rbs_types_record_t *rbs_types_record_new(rbs_allocator_t *allocator, rbs_locatio
|
|
|
1353
1531
|
|
|
1354
1532
|
return instance;
|
|
1355
1533
|
}
|
|
1356
|
-
#line
|
|
1357
|
-
rbs_types_record_field_type_t *rbs_types_record_field_type_new(rbs_allocator_t *allocator,
|
|
1534
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1535
|
+
rbs_types_record_field_type_t *rbs_types_record_field_type_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_t *type, bool required) {
|
|
1358
1536
|
rbs_types_record_field_type_t *instance = rbs_allocator_alloc(allocator, rbs_types_record_field_type_t);
|
|
1359
1537
|
|
|
1360
1538
|
*instance = (rbs_types_record_field_type_t) {
|
|
@@ -1368,8 +1546,8 @@ rbs_types_record_field_type_t *rbs_types_record_field_type_new(rbs_allocator_t *
|
|
|
1368
1546
|
|
|
1369
1547
|
return instance;
|
|
1370
1548
|
}
|
|
1371
|
-
#line
|
|
1372
|
-
rbs_types_tuple_t *rbs_types_tuple_new(rbs_allocator_t *allocator,
|
|
1549
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1550
|
+
rbs_types_tuple_t *rbs_types_tuple_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_list_t *types) {
|
|
1373
1551
|
rbs_types_tuple_t *instance = rbs_allocator_alloc(allocator, rbs_types_tuple_t);
|
|
1374
1552
|
|
|
1375
1553
|
*instance = (rbs_types_tuple_t) {
|
|
@@ -1382,8 +1560,8 @@ rbs_types_tuple_t *rbs_types_tuple_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
1382
1560
|
|
|
1383
1561
|
return instance;
|
|
1384
1562
|
}
|
|
1385
|
-
#line
|
|
1386
|
-
rbs_types_union_t *rbs_types_union_new(rbs_allocator_t *allocator,
|
|
1563
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1564
|
+
rbs_types_union_t *rbs_types_union_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_list_t *types) {
|
|
1387
1565
|
rbs_types_union_t *instance = rbs_allocator_alloc(allocator, rbs_types_union_t);
|
|
1388
1566
|
|
|
1389
1567
|
*instance = (rbs_types_union_t) {
|
|
@@ -1396,8 +1574,8 @@ rbs_types_union_t *rbs_types_union_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
1396
1574
|
|
|
1397
1575
|
return instance;
|
|
1398
1576
|
}
|
|
1399
|
-
#line
|
|
1400
|
-
rbs_types_untyped_function_t *rbs_types_untyped_function_new(rbs_allocator_t *allocator,
|
|
1577
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1578
|
+
rbs_types_untyped_function_t *rbs_types_untyped_function_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_t *return_type) {
|
|
1401
1579
|
rbs_types_untyped_function_t *instance = rbs_allocator_alloc(allocator, rbs_types_untyped_function_t);
|
|
1402
1580
|
|
|
1403
1581
|
*instance = (rbs_types_untyped_function_t) {
|
|
@@ -1410,8 +1588,8 @@ rbs_types_untyped_function_t *rbs_types_untyped_function_new(rbs_allocator_t *al
|
|
|
1410
1588
|
|
|
1411
1589
|
return instance;
|
|
1412
1590
|
}
|
|
1413
|
-
#line
|
|
1414
|
-
rbs_types_variable_t *rbs_types_variable_new(rbs_allocator_t *allocator,
|
|
1591
|
+
#line 140 "prism/templates/src/ast.c.erb"
|
|
1592
|
+
rbs_types_variable_t *rbs_types_variable_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_ast_symbol_t *name) {
|
|
1415
1593
|
rbs_types_variable_t *instance = rbs_allocator_alloc(allocator, rbs_types_variable_t);
|
|
1416
1594
|
|
|
1417
1595
|
*instance = (rbs_types_variable_t) {
|