rbs 3.10.4 → 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/dependabot.yml +14 -14
- data/.github/workflows/bundle-update.yml +60 -0
- data/.github/workflows/c-check.yml +7 -5
- data/.github/workflows/comments.yml +2 -2
- data/.github/workflows/dependabot.yml +2 -2
- data/.github/workflows/ruby.yml +16 -26
- data/.github/workflows/rust.yml +95 -0
- data/.github/workflows/typecheck.yml +1 -1
- data/.github/workflows/windows.yml +2 -2
- data/.rubocop.yml +2 -2
- data/.vscode/extensions.json +5 -0
- data/.vscode/settings.json +19 -0
- data/CHANGELOG.md +202 -2
- data/Rakefile +9 -23
- data/Steepfile +2 -0
- data/config.yml +457 -13
- data/core/array.rbs +218 -188
- data/core/basic_object.rbs +9 -8
- data/core/binding.rbs +0 -2
- data/core/builtin.rbs +2 -2
- data/core/class.rbs +6 -5
- data/core/comparable.rbs +45 -31
- data/core/complex.rbs +66 -55
- data/core/dir.rbs +57 -45
- data/core/encoding.rbs +6 -6
- data/core/enumerable.rbs +105 -91
- data/core/enumerator/arithmetic_sequence.rbs +70 -0
- data/core/enumerator.rbs +24 -3
- data/core/errno.rbs +3 -2
- data/core/errors.rbs +31 -29
- data/core/exception.rbs +12 -12
- data/core/fiber.rbs +47 -36
- data/core/file.rbs +242 -169
- data/core/file_test.rbs +2 -2
- data/core/float.rbs +42 -68
- data/core/gc.rbs +78 -70
- data/core/hash.rbs +70 -60
- data/core/integer.rbs +32 -75
- data/core/io/buffer.rbs +36 -36
- data/core/io/wait.rbs +7 -7
- data/core/io.rbs +192 -146
- data/core/kernel.rbs +198 -147
- data/core/marshal.rbs +3 -3
- data/core/match_data.rbs +14 -12
- data/core/math.rbs +69 -67
- data/core/method.rbs +6 -8
- data/core/module.rbs +148 -88
- data/core/nil_class.rbs +4 -3
- data/core/numeric.rbs +53 -50
- data/core/object.rbs +6 -8
- data/core/object_space.rbs +11 -10
- data/core/pathname.rbs +131 -81
- data/core/proc.rbs +65 -34
- data/core/process.rbs +221 -201
- data/core/ractor.rbs +15 -11
- data/core/random.rbs +21 -3
- data/core/range.rbs +152 -49
- data/core/rational.rbs +5 -56
- 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 -116
- 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 +318 -298
- data/core/struct.rbs +26 -25
- data/core/symbol.rbs +25 -24
- data/core/thread.rbs +40 -41
- 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 +576 -0
- data/docs/syntax.md +46 -16
- data/docs/type_fingerprint.md +21 -0
- data/exe/rbs +1 -1
- data/ext/rbs_extension/ast_translation.c +595 -98
- data/ext/rbs_extension/class_constants.c +30 -0
- data/ext/rbs_extension/class_constants.h +15 -0
- data/ext/rbs_extension/legacy_location.c +30 -53
- data/ext/rbs_extension/legacy_location.h +37 -0
- data/ext/rbs_extension/main.c +125 -24
- data/include/rbs/ast.h +485 -150
- data/include/rbs/lexer.h +11 -4
- data/include/rbs/location.h +25 -44
- data/include/rbs/parser.h +20 -2
- data/include/rbs/util/rbs_constant_pool.h +0 -3
- data/include/rbs.h +8 -0
- data/lib/rbs/ast/annotation.rb +1 -1
- data/lib/rbs/ast/comment.rb +1 -1
- data/lib/rbs/ast/declarations.rb +10 -10
- data/lib/rbs/ast/members.rb +14 -14
- data/lib/rbs/ast/ruby/annotations.rb +409 -0
- data/lib/rbs/ast/ruby/comment_block.rb +245 -0
- data/lib/rbs/ast/ruby/declarations.rb +281 -0
- data/lib/rbs/ast/ruby/helpers/constant_helper.rb +28 -0
- data/lib/rbs/ast/ruby/helpers/location_helper.rb +15 -0
- data/lib/rbs/ast/ruby/members.rb +723 -0
- data/lib/rbs/ast/type_param.rb +24 -4
- data/lib/rbs/buffer.rb +105 -20
- data/lib/rbs/cli/diff.rb +16 -15
- data/lib/rbs/cli/validate.rb +62 -125
- data/lib/rbs/cli.rb +55 -23
- data/lib/rbs/collection/config/lockfile_generator.rb +8 -4
- data/lib/rbs/collection/sources/git.rb +1 -0
- data/lib/rbs/collection.rb +0 -1
- data/lib/rbs/definition.rb +6 -1
- data/lib/rbs/definition_builder/ancestor_builder.rb +119 -63
- data/lib/rbs/definition_builder/method_builder.rb +65 -30
- data/lib/rbs/definition_builder.rb +177 -20
- data/lib/rbs/diff.rb +7 -1
- data/lib/rbs/environment/class_entry.rb +69 -0
- data/lib/rbs/environment/module_entry.rb +66 -0
- data/lib/rbs/environment.rb +338 -155
- data/lib/rbs/environment_loader.rb +2 -2
- data/lib/rbs/errors.rb +30 -20
- data/lib/rbs/inline_parser/comment_association.rb +117 -0
- data/lib/rbs/inline_parser.rb +542 -0
- data/lib/rbs/location_aux.rb +36 -4
- data/lib/rbs/locator.rb +5 -1
- data/lib/rbs/method_type.rb +5 -3
- data/lib/rbs/namespace.rb +0 -7
- data/lib/rbs/parser_aux.rb +31 -8
- data/lib/rbs/prototype/helpers.rb +57 -0
- data/lib/rbs/prototype/rb.rb +3 -28
- data/lib/rbs/prototype/rbi.rb +3 -20
- data/lib/rbs/prototype/runtime.rb +10 -2
- data/lib/rbs/resolver/type_name_resolver.rb +0 -8
- data/lib/rbs/source.rb +99 -0
- data/lib/rbs/subtractor.rb +4 -3
- data/lib/rbs/test/type_check.rb +5 -2
- data/lib/rbs/type_name.rb +1 -8
- data/lib/rbs/types.rb +88 -78
- data/lib/rbs/unit_test/convertibles.rb +1 -0
- data/lib/rbs/unit_test/type_assertions.rb +35 -8
- data/lib/rbs/validator.rb +2 -2
- data/lib/rbs/version.rb +1 -1
- data/lib/rbs.rb +12 -1
- data/rbs.gemspec +3 -2
- 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/schema/typeParam.json +17 -1
- data/sig/ancestor_builder.rbs +1 -1
- data/sig/ast/ruby/annotations.rbs +421 -0
- data/sig/ast/ruby/comment_block.rbs +127 -0
- data/sig/ast/ruby/declarations.rbs +158 -0
- data/sig/ast/ruby/helpers/constant_helper.rbs +11 -0
- data/sig/ast/ruby/helpers/location_helper.rbs +15 -0
- data/sig/ast/ruby/members.rbs +178 -0
- data/sig/buffer.rbs +63 -5
- data/sig/cli/diff.rbs +5 -11
- data/sig/cli/validate.rbs +12 -8
- data/sig/cli.rbs +18 -18
- data/sig/definition.rbs +6 -0
- data/sig/definition_builder.rbs +3 -1
- data/sig/environment/class_entry.rbs +50 -0
- data/sig/environment/module_entry.rbs +50 -0
- data/sig/environment.rbs +37 -81
- data/sig/errors.rbs +26 -20
- data/sig/inline_parser/comment_association.rbs +71 -0
- data/sig/inline_parser.rbs +124 -0
- data/sig/location.rbs +32 -7
- data/sig/locator.rbs +0 -2
- data/sig/method_builder.rbs +9 -4
- data/sig/namespace.rbs +0 -5
- data/sig/parser.rbs +47 -13
- data/sig/prototype/helpers.rbs +2 -0
- data/sig/resolver/type_name_resolver.rbs +0 -3
- data/sig/source.rbs +48 -0
- data/sig/type_param.rbs +13 -8
- data/sig/typename.rbs +0 -5
- data/sig/types.rbs +6 -7
- data/sig/unit_test/spy.rbs +0 -8
- data/sig/unit_test/type_assertions.rbs +11 -0
- data/src/ast.c +491 -143
- data/src/lexer.c +1552 -1314
- data/src/lexer.re +7 -0
- data/src/lexstate.c +8 -1
- data/src/location.c +8 -48
- data/src/parser.c +1107 -409
- 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/digest/0/digest.rbs +110 -0
- data/stdlib/erb/0/erb.rbs +64 -53
- data/stdlib/etc/0/etc.rbs +55 -50
- data/stdlib/fileutils/0/fileutils.rbs +140 -126
- data/stdlib/forwardable/0/forwardable.rbs +10 -10
- data/stdlib/io-console/0/io-console.rbs +2 -2
- data/stdlib/json/0/json.rbs +158 -131
- 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 -30
- data/stdlib/open-uri/0/open-uri.rbs +8 -8
- data/stdlib/open3/0/open3.rbs +469 -10
- data/stdlib/openssl/0/openssl.rbs +144 -129
- data/stdlib/optparse/0/optparse.rbs +23 -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 +62 -9
- data/stdlib/psych/0/store.rbs +2 -4
- data/stdlib/pty/0/pty.rbs +9 -6
- data/stdlib/random-formatter/0/random-formatter.rbs +277 -0
- data/stdlib/rdoc/0/code_object.rbs +2 -1
- data/stdlib/rdoc/0/parser.rbs +1 -1
- data/stdlib/rdoc/0/store.rbs +1 -1
- data/stdlib/ripper/0/ripper.rbs +20 -17
- data/stdlib/securerandom/0/manifest.yaml +2 -0
- data/stdlib/securerandom/0/securerandom.rbs +7 -20
- data/stdlib/shellwords/0/shellwords.rbs +2 -2
- data/stdlib/socket/0/addrinfo.rbs +9 -9
- 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 +31 -18
- data/stdlib/uri/0/file.rbs +2 -2
- data/stdlib/uri/0/generic.rbs +9 -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 +6 -6
- 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 +66 -3
data/src/ast.c
CHANGED
|
@@ -75,6 +75,32 @@ 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";
|
|
80
|
+
case RBS_AST_RUBY_ANNOTATIONS_CLASS_ALIAS_ANNOTATION:
|
|
81
|
+
return "RBS::AST::Ruby::Annotations::ClassAliasAnnotation";
|
|
82
|
+
case RBS_AST_RUBY_ANNOTATIONS_COLON_METHOD_TYPE_ANNOTATION:
|
|
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";
|
|
86
|
+
case RBS_AST_RUBY_ANNOTATIONS_INSTANCE_VARIABLE_ANNOTATION:
|
|
87
|
+
return "RBS::AST::Ruby::Annotations::InstanceVariableAnnotation";
|
|
88
|
+
case RBS_AST_RUBY_ANNOTATIONS_METHOD_TYPES_ANNOTATION:
|
|
89
|
+
return "RBS::AST::Ruby::Annotations::MethodTypesAnnotation";
|
|
90
|
+
case RBS_AST_RUBY_ANNOTATIONS_MODULE_ALIAS_ANNOTATION:
|
|
91
|
+
return "RBS::AST::Ruby::Annotations::ModuleAliasAnnotation";
|
|
92
|
+
case RBS_AST_RUBY_ANNOTATIONS_NODE_TYPE_ASSERTION:
|
|
93
|
+
return "RBS::AST::Ruby::Annotations::NodeTypeAssertion";
|
|
94
|
+
case RBS_AST_RUBY_ANNOTATIONS_PARAM_TYPE_ANNOTATION:
|
|
95
|
+
return "RBS::AST::Ruby::Annotations::ParamTypeAnnotation";
|
|
96
|
+
case RBS_AST_RUBY_ANNOTATIONS_RETURN_TYPE_ANNOTATION:
|
|
97
|
+
return "RBS::AST::Ruby::Annotations::ReturnTypeAnnotation";
|
|
98
|
+
case RBS_AST_RUBY_ANNOTATIONS_SKIP_ANNOTATION:
|
|
99
|
+
return "RBS::AST::Ruby::Annotations::SkipAnnotation";
|
|
100
|
+
case RBS_AST_RUBY_ANNOTATIONS_SPLAT_PARAM_TYPE_ANNOTATION:
|
|
101
|
+
return "RBS::AST::Ruby::Annotations::SplatParamTypeAnnotation";
|
|
102
|
+
case RBS_AST_RUBY_ANNOTATIONS_TYPE_APPLICATION_ANNOTATION:
|
|
103
|
+
return "RBS::AST::Ruby::Annotations::TypeApplicationAnnotation";
|
|
78
104
|
case RBS_AST_STRING:
|
|
79
105
|
return "RBS::AST::String";
|
|
80
106
|
case RBS_AST_TYPE_PARAM:
|
|
@@ -199,8 +225,6 @@ bool rbs_node_equal(rbs_node_t *lhs, rbs_node_t *rhs) {
|
|
|
199
225
|
switch (lhs->type) {
|
|
200
226
|
case RBS_AST_SYMBOL:
|
|
201
227
|
return ((rbs_ast_symbol_t *) lhs)->constant_id == ((rbs_ast_symbol_t *) rhs)->constant_id;
|
|
202
|
-
case RBS_KEYWORD:
|
|
203
|
-
return ((rbs_keyword_t *) lhs)->constant_id == ((rbs_keyword_t *) rhs)->constant_id;
|
|
204
228
|
case RBS_AST_BOOL:
|
|
205
229
|
return ((rbs_ast_bool_t *) lhs)->value == ((rbs_ast_bool_t *) rhs)->value;
|
|
206
230
|
case RBS_AST_INTEGER:
|
|
@@ -252,21 +276,7 @@ rbs_node_t *rbs_hash_get(rbs_hash_t *hash, rbs_node_t *key) {
|
|
|
252
276
|
return node ? node->value : NULL;
|
|
253
277
|
}
|
|
254
278
|
|
|
255
|
-
|
|
256
|
-
rbs_keyword_t *instance = rbs_allocator_alloc(allocator, rbs_keyword_t);
|
|
257
|
-
|
|
258
|
-
*instance = (rbs_keyword_t) {
|
|
259
|
-
.base = (rbs_node_t) {
|
|
260
|
-
.type = RBS_KEYWORD,
|
|
261
|
-
.location = location,
|
|
262
|
-
},
|
|
263
|
-
.constant_id = constant_id,
|
|
264
|
-
};
|
|
265
|
-
|
|
266
|
-
return instance;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
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) {
|
|
270
280
|
rbs_ast_symbol_t *instance = rbs_allocator_alloc(allocator, rbs_ast_symbol_t);
|
|
271
281
|
|
|
272
282
|
*instance = (rbs_ast_symbol_t) {
|
|
@@ -280,8 +290,8 @@ rbs_ast_symbol_t *rbs_ast_symbol_new(rbs_allocator_t *allocator, rbs_location_t
|
|
|
280
290
|
return instance;
|
|
281
291
|
}
|
|
282
292
|
|
|
283
|
-
#line
|
|
284
|
-
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) {
|
|
285
295
|
rbs_ast_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_annotation_t);
|
|
286
296
|
|
|
287
297
|
*instance = (rbs_ast_annotation_t) {
|
|
@@ -294,8 +304,8 @@ rbs_ast_annotation_t *rbs_ast_annotation_new(rbs_allocator_t *allocator, rbs_loc
|
|
|
294
304
|
|
|
295
305
|
return instance;
|
|
296
306
|
}
|
|
297
|
-
#line
|
|
298
|
-
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) {
|
|
299
309
|
rbs_ast_bool_t *instance = rbs_allocator_alloc(allocator, rbs_ast_bool_t);
|
|
300
310
|
|
|
301
311
|
*instance = (rbs_ast_bool_t) {
|
|
@@ -308,8 +318,8 @@ rbs_ast_bool_t *rbs_ast_bool_new(rbs_allocator_t *allocator, rbs_location_t *loc
|
|
|
308
318
|
|
|
309
319
|
return instance;
|
|
310
320
|
}
|
|
311
|
-
#line
|
|
312
|
-
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) {
|
|
313
323
|
rbs_ast_comment_t *instance = rbs_allocator_alloc(allocator, rbs_ast_comment_t);
|
|
314
324
|
|
|
315
325
|
*instance = (rbs_ast_comment_t) {
|
|
@@ -322,8 +332,8 @@ rbs_ast_comment_t *rbs_ast_comment_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
322
332
|
|
|
323
333
|
return instance;
|
|
324
334
|
}
|
|
325
|
-
#line
|
|
326
|
-
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) {
|
|
327
337
|
rbs_ast_declarations_class_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_class_t);
|
|
328
338
|
|
|
329
339
|
*instance = (rbs_ast_declarations_class_t) {
|
|
@@ -337,12 +347,17 @@ rbs_ast_declarations_class_t *rbs_ast_declarations_class_new(rbs_allocator_t *al
|
|
|
337
347
|
.members = members,
|
|
338
348
|
.annotations = annotations,
|
|
339
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,
|
|
340
355
|
};
|
|
341
356
|
|
|
342
357
|
return instance;
|
|
343
358
|
}
|
|
344
|
-
#line
|
|
345
|
-
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) {
|
|
346
361
|
rbs_ast_declarations_class_super_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_class_super_t);
|
|
347
362
|
|
|
348
363
|
*instance = (rbs_ast_declarations_class_super_t) {
|
|
@@ -352,12 +367,14 @@ rbs_ast_declarations_class_super_t *rbs_ast_declarations_class_super_new(rbs_all
|
|
|
352
367
|
},
|
|
353
368
|
.name = name,
|
|
354
369
|
.args = args,
|
|
370
|
+
.name_range = name_range,
|
|
371
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
355
372
|
};
|
|
356
373
|
|
|
357
374
|
return instance;
|
|
358
375
|
}
|
|
359
|
-
#line
|
|
360
|
-
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) {
|
|
361
378
|
rbs_ast_declarations_class_alias_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_class_alias_t);
|
|
362
379
|
|
|
363
380
|
*instance = (rbs_ast_declarations_class_alias_t) {
|
|
@@ -369,12 +386,16 @@ rbs_ast_declarations_class_alias_t *rbs_ast_declarations_class_alias_new(rbs_all
|
|
|
369
386
|
.old_name = old_name,
|
|
370
387
|
.comment = comment,
|
|
371
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,
|
|
372
393
|
};
|
|
373
394
|
|
|
374
395
|
return instance;
|
|
375
396
|
}
|
|
376
|
-
#line
|
|
377
|
-
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) {
|
|
378
399
|
rbs_ast_declarations_constant_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_constant_t);
|
|
379
400
|
|
|
380
401
|
*instance = (rbs_ast_declarations_constant_t) {
|
|
@@ -386,12 +407,14 @@ rbs_ast_declarations_constant_t *rbs_ast_declarations_constant_new(rbs_allocator
|
|
|
386
407
|
.type = type,
|
|
387
408
|
.comment = comment,
|
|
388
409
|
.annotations = annotations,
|
|
410
|
+
.name_range = name_range,
|
|
411
|
+
.colon_range = colon_range,
|
|
389
412
|
};
|
|
390
413
|
|
|
391
414
|
return instance;
|
|
392
415
|
}
|
|
393
|
-
#line
|
|
394
|
-
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) {
|
|
395
418
|
rbs_ast_declarations_global_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_global_t);
|
|
396
419
|
|
|
397
420
|
*instance = (rbs_ast_declarations_global_t) {
|
|
@@ -403,12 +426,14 @@ rbs_ast_declarations_global_t *rbs_ast_declarations_global_new(rbs_allocator_t *
|
|
|
403
426
|
.type = type,
|
|
404
427
|
.comment = comment,
|
|
405
428
|
.annotations = annotations,
|
|
429
|
+
.name_range = name_range,
|
|
430
|
+
.colon_range = colon_range,
|
|
406
431
|
};
|
|
407
432
|
|
|
408
433
|
return instance;
|
|
409
434
|
}
|
|
410
|
-
#line
|
|
411
|
-
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) {
|
|
412
437
|
rbs_ast_declarations_interface_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_interface_t);
|
|
413
438
|
|
|
414
439
|
*instance = (rbs_ast_declarations_interface_t) {
|
|
@@ -421,12 +446,16 @@ rbs_ast_declarations_interface_t *rbs_ast_declarations_interface_new(rbs_allocat
|
|
|
421
446
|
.members = members,
|
|
422
447
|
.annotations = annotations,
|
|
423
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,
|
|
424
453
|
};
|
|
425
454
|
|
|
426
455
|
return instance;
|
|
427
456
|
}
|
|
428
|
-
#line
|
|
429
|
-
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) {
|
|
430
459
|
rbs_ast_declarations_module_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_module_t);
|
|
431
460
|
|
|
432
461
|
*instance = (rbs_ast_declarations_module_t) {
|
|
@@ -440,12 +469,18 @@ rbs_ast_declarations_module_t *rbs_ast_declarations_module_new(rbs_allocator_t *
|
|
|
440
469
|
.members = members,
|
|
441
470
|
.annotations = annotations,
|
|
442
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,
|
|
443
478
|
};
|
|
444
479
|
|
|
445
480
|
return instance;
|
|
446
481
|
}
|
|
447
|
-
#line
|
|
448
|
-
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) {
|
|
449
484
|
rbs_ast_declarations_module_self_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_module_self_t);
|
|
450
485
|
|
|
451
486
|
*instance = (rbs_ast_declarations_module_self_t) {
|
|
@@ -455,12 +490,14 @@ rbs_ast_declarations_module_self_t *rbs_ast_declarations_module_self_new(rbs_all
|
|
|
455
490
|
},
|
|
456
491
|
.name = name,
|
|
457
492
|
.args = args,
|
|
493
|
+
.name_range = name_range,
|
|
494
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
458
495
|
};
|
|
459
496
|
|
|
460
497
|
return instance;
|
|
461
498
|
}
|
|
462
|
-
#line
|
|
463
|
-
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) {
|
|
464
501
|
rbs_ast_declarations_module_alias_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_module_alias_t);
|
|
465
502
|
|
|
466
503
|
*instance = (rbs_ast_declarations_module_alias_t) {
|
|
@@ -472,12 +509,16 @@ rbs_ast_declarations_module_alias_t *rbs_ast_declarations_module_alias_new(rbs_a
|
|
|
472
509
|
.old_name = old_name,
|
|
473
510
|
.comment = comment,
|
|
474
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,
|
|
475
516
|
};
|
|
476
517
|
|
|
477
518
|
return instance;
|
|
478
519
|
}
|
|
479
|
-
#line
|
|
480
|
-
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) {
|
|
481
522
|
rbs_ast_declarations_type_alias_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_type_alias_t);
|
|
482
523
|
|
|
483
524
|
*instance = (rbs_ast_declarations_type_alias_t) {
|
|
@@ -490,12 +531,16 @@ rbs_ast_declarations_type_alias_t *rbs_ast_declarations_type_alias_new(rbs_alloc
|
|
|
490
531
|
.type = type,
|
|
491
532
|
.annotations = annotations,
|
|
492
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,
|
|
493
538
|
};
|
|
494
539
|
|
|
495
540
|
return instance;
|
|
496
541
|
}
|
|
497
|
-
#line
|
|
498
|
-
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) {
|
|
499
544
|
rbs_ast_directives_use_t *instance = rbs_allocator_alloc(allocator, rbs_ast_directives_use_t);
|
|
500
545
|
|
|
501
546
|
*instance = (rbs_ast_directives_use_t) {
|
|
@@ -504,12 +549,13 @@ rbs_ast_directives_use_t *rbs_ast_directives_use_new(rbs_allocator_t *allocator,
|
|
|
504
549
|
.location = location,
|
|
505
550
|
},
|
|
506
551
|
.clauses = clauses,
|
|
552
|
+
.keyword_range = keyword_range,
|
|
507
553
|
};
|
|
508
554
|
|
|
509
555
|
return instance;
|
|
510
556
|
}
|
|
511
|
-
#line
|
|
512
|
-
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) {
|
|
513
559
|
rbs_ast_directives_use_single_clause_t *instance = rbs_allocator_alloc(allocator, rbs_ast_directives_use_single_clause_t);
|
|
514
560
|
|
|
515
561
|
*instance = (rbs_ast_directives_use_single_clause_t) {
|
|
@@ -519,12 +565,15 @@ rbs_ast_directives_use_single_clause_t *rbs_ast_directives_use_single_clause_new
|
|
|
519
565
|
},
|
|
520
566
|
.type_name = type_name,
|
|
521
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,
|
|
522
571
|
};
|
|
523
572
|
|
|
524
573
|
return instance;
|
|
525
574
|
}
|
|
526
|
-
#line
|
|
527
|
-
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) {
|
|
528
577
|
rbs_ast_directives_use_wildcard_clause_t *instance = rbs_allocator_alloc(allocator, rbs_ast_directives_use_wildcard_clause_t);
|
|
529
578
|
|
|
530
579
|
*instance = (rbs_ast_directives_use_wildcard_clause_t) {
|
|
@@ -533,12 +582,14 @@ rbs_ast_directives_use_wildcard_clause_t *rbs_ast_directives_use_wildcard_clause
|
|
|
533
582
|
.location = location,
|
|
534
583
|
},
|
|
535
584
|
.rbs_namespace = rbs_namespace,
|
|
585
|
+
.namespace_range = namespace_range,
|
|
586
|
+
.star_range = star_range,
|
|
536
587
|
};
|
|
537
588
|
|
|
538
589
|
return instance;
|
|
539
590
|
}
|
|
540
|
-
#line
|
|
541
|
-
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) {
|
|
542
593
|
rbs_ast_integer_t *instance = rbs_allocator_alloc(allocator, rbs_ast_integer_t);
|
|
543
594
|
|
|
544
595
|
*instance = (rbs_ast_integer_t) {
|
|
@@ -551,8 +602,8 @@ rbs_ast_integer_t *rbs_ast_integer_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
551
602
|
|
|
552
603
|
return instance;
|
|
553
604
|
}
|
|
554
|
-
#line
|
|
555
|
-
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) {
|
|
556
607
|
rbs_ast_members_alias_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_alias_t);
|
|
557
608
|
|
|
558
609
|
*instance = (rbs_ast_members_alias_t) {
|
|
@@ -565,12 +616,17 @@ rbs_ast_members_alias_t *rbs_ast_members_alias_new(rbs_allocator_t *allocator, r
|
|
|
565
616
|
.kind = kind,
|
|
566
617
|
.annotations = annotations,
|
|
567
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,
|
|
568
624
|
};
|
|
569
625
|
|
|
570
626
|
return instance;
|
|
571
627
|
}
|
|
572
|
-
#line
|
|
573
|
-
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) {
|
|
574
630
|
rbs_ast_members_attr_accessor_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_attr_accessor_t);
|
|
575
631
|
|
|
576
632
|
*instance = (rbs_ast_members_attr_accessor_t) {
|
|
@@ -585,12 +641,19 @@ rbs_ast_members_attr_accessor_t *rbs_ast_members_attr_accessor_new(rbs_allocator
|
|
|
585
641
|
.annotations = annotations,
|
|
586
642
|
.comment = comment,
|
|
587
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,
|
|
588
651
|
};
|
|
589
652
|
|
|
590
653
|
return instance;
|
|
591
654
|
}
|
|
592
|
-
#line
|
|
593
|
-
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) {
|
|
594
657
|
rbs_ast_members_attr_reader_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_attr_reader_t);
|
|
595
658
|
|
|
596
659
|
*instance = (rbs_ast_members_attr_reader_t) {
|
|
@@ -605,12 +668,19 @@ rbs_ast_members_attr_reader_t *rbs_ast_members_attr_reader_new(rbs_allocator_t *
|
|
|
605
668
|
.annotations = annotations,
|
|
606
669
|
.comment = comment,
|
|
607
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,
|
|
608
678
|
};
|
|
609
679
|
|
|
610
680
|
return instance;
|
|
611
681
|
}
|
|
612
|
-
#line
|
|
613
|
-
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) {
|
|
614
684
|
rbs_ast_members_attr_writer_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_attr_writer_t);
|
|
615
685
|
|
|
616
686
|
*instance = (rbs_ast_members_attr_writer_t) {
|
|
@@ -625,12 +695,19 @@ rbs_ast_members_attr_writer_t *rbs_ast_members_attr_writer_new(rbs_allocator_t *
|
|
|
625
695
|
.annotations = annotations,
|
|
626
696
|
.comment = comment,
|
|
627
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,
|
|
628
705
|
};
|
|
629
706
|
|
|
630
707
|
return instance;
|
|
631
708
|
}
|
|
632
|
-
#line
|
|
633
|
-
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) {
|
|
634
711
|
rbs_ast_members_class_instance_variable_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_class_instance_variable_t);
|
|
635
712
|
|
|
636
713
|
*instance = (rbs_ast_members_class_instance_variable_t) {
|
|
@@ -641,12 +718,15 @@ rbs_ast_members_class_instance_variable_t *rbs_ast_members_class_instance_variab
|
|
|
641
718
|
.name = name,
|
|
642
719
|
.type = type,
|
|
643
720
|
.comment = comment,
|
|
721
|
+
.name_range = name_range,
|
|
722
|
+
.colon_range = colon_range,
|
|
723
|
+
.kind_range = RBS_LOCATION_NULL_RANGE,
|
|
644
724
|
};
|
|
645
725
|
|
|
646
726
|
return instance;
|
|
647
727
|
}
|
|
648
|
-
#line
|
|
649
|
-
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) {
|
|
650
730
|
rbs_ast_members_class_variable_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_class_variable_t);
|
|
651
731
|
|
|
652
732
|
*instance = (rbs_ast_members_class_variable_t) {
|
|
@@ -657,12 +737,15 @@ rbs_ast_members_class_variable_t *rbs_ast_members_class_variable_new(rbs_allocat
|
|
|
657
737
|
.name = name,
|
|
658
738
|
.type = type,
|
|
659
739
|
.comment = comment,
|
|
740
|
+
.name_range = name_range,
|
|
741
|
+
.colon_range = colon_range,
|
|
742
|
+
.kind_range = RBS_LOCATION_NULL_RANGE,
|
|
660
743
|
};
|
|
661
744
|
|
|
662
745
|
return instance;
|
|
663
746
|
}
|
|
664
|
-
#line
|
|
665
|
-
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) {
|
|
666
749
|
rbs_ast_members_extend_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_extend_t);
|
|
667
750
|
|
|
668
751
|
*instance = (rbs_ast_members_extend_t) {
|
|
@@ -674,12 +757,15 @@ rbs_ast_members_extend_t *rbs_ast_members_extend_new(rbs_allocator_t *allocator,
|
|
|
674
757
|
.args = args,
|
|
675
758
|
.annotations = annotations,
|
|
676
759
|
.comment = comment,
|
|
760
|
+
.name_range = name_range,
|
|
761
|
+
.keyword_range = keyword_range,
|
|
762
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
677
763
|
};
|
|
678
764
|
|
|
679
765
|
return instance;
|
|
680
766
|
}
|
|
681
|
-
#line
|
|
682
|
-
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) {
|
|
683
769
|
rbs_ast_members_include_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_include_t);
|
|
684
770
|
|
|
685
771
|
*instance = (rbs_ast_members_include_t) {
|
|
@@ -691,12 +777,15 @@ rbs_ast_members_include_t *rbs_ast_members_include_new(rbs_allocator_t *allocato
|
|
|
691
777
|
.args = args,
|
|
692
778
|
.annotations = annotations,
|
|
693
779
|
.comment = comment,
|
|
780
|
+
.name_range = name_range,
|
|
781
|
+
.keyword_range = keyword_range,
|
|
782
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
694
783
|
};
|
|
695
784
|
|
|
696
785
|
return instance;
|
|
697
786
|
}
|
|
698
|
-
#line
|
|
699
|
-
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) {
|
|
700
789
|
rbs_ast_members_instance_variable_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_instance_variable_t);
|
|
701
790
|
|
|
702
791
|
*instance = (rbs_ast_members_instance_variable_t) {
|
|
@@ -707,12 +796,15 @@ rbs_ast_members_instance_variable_t *rbs_ast_members_instance_variable_new(rbs_a
|
|
|
707
796
|
.name = name,
|
|
708
797
|
.type = type,
|
|
709
798
|
.comment = comment,
|
|
799
|
+
.name_range = name_range,
|
|
800
|
+
.colon_range = colon_range,
|
|
801
|
+
.kind_range = RBS_LOCATION_NULL_RANGE,
|
|
710
802
|
};
|
|
711
803
|
|
|
712
804
|
return instance;
|
|
713
805
|
}
|
|
714
|
-
#line
|
|
715
|
-
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) {
|
|
716
808
|
rbs_ast_members_method_definition_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_method_definition_t);
|
|
717
809
|
|
|
718
810
|
*instance = (rbs_ast_members_method_definition_t) {
|
|
@@ -727,12 +819,17 @@ rbs_ast_members_method_definition_t *rbs_ast_members_method_definition_new(rbs_a
|
|
|
727
819
|
.comment = comment,
|
|
728
820
|
.overloading = overloading,
|
|
729
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,
|
|
730
827
|
};
|
|
731
828
|
|
|
732
829
|
return instance;
|
|
733
830
|
}
|
|
734
|
-
#line
|
|
735
|
-
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) {
|
|
736
833
|
rbs_ast_members_method_definition_overload_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_method_definition_overload_t);
|
|
737
834
|
|
|
738
835
|
*instance = (rbs_ast_members_method_definition_overload_t) {
|
|
@@ -746,8 +843,8 @@ rbs_ast_members_method_definition_overload_t *rbs_ast_members_method_definition_
|
|
|
746
843
|
|
|
747
844
|
return instance;
|
|
748
845
|
}
|
|
749
|
-
#line
|
|
750
|
-
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) {
|
|
751
848
|
rbs_ast_members_prepend_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_prepend_t);
|
|
752
849
|
|
|
753
850
|
*instance = (rbs_ast_members_prepend_t) {
|
|
@@ -759,12 +856,15 @@ rbs_ast_members_prepend_t *rbs_ast_members_prepend_new(rbs_allocator_t *allocato
|
|
|
759
856
|
.args = args,
|
|
760
857
|
.annotations = annotations,
|
|
761
858
|
.comment = comment,
|
|
859
|
+
.name_range = name_range,
|
|
860
|
+
.keyword_range = keyword_range,
|
|
861
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
762
862
|
};
|
|
763
863
|
|
|
764
864
|
return instance;
|
|
765
865
|
}
|
|
766
|
-
#line
|
|
767
|
-
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) {
|
|
768
868
|
rbs_ast_members_private_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_private_t);
|
|
769
869
|
|
|
770
870
|
*instance = (rbs_ast_members_private_t) {
|
|
@@ -776,8 +876,8 @@ rbs_ast_members_private_t *rbs_ast_members_private_new(rbs_allocator_t *allocato
|
|
|
776
876
|
|
|
777
877
|
return instance;
|
|
778
878
|
}
|
|
779
|
-
#line
|
|
780
|
-
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) {
|
|
781
881
|
rbs_ast_members_public_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_public_t);
|
|
782
882
|
|
|
783
883
|
*instance = (rbs_ast_members_public_t) {
|
|
@@ -789,8 +889,237 @@ rbs_ast_members_public_t *rbs_ast_members_public_new(rbs_allocator_t *allocator,
|
|
|
789
889
|
|
|
790
890
|
return instance;
|
|
791
891
|
}
|
|
792
|
-
#line
|
|
793
|
-
|
|
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) {
|
|
915
|
+
rbs_ast_ruby_annotations_class_alias_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_class_alias_annotation_t);
|
|
916
|
+
|
|
917
|
+
*instance = (rbs_ast_ruby_annotations_class_alias_annotation_t) {
|
|
918
|
+
.base = (rbs_node_t) {
|
|
919
|
+
.type = RBS_AST_RUBY_ANNOTATIONS_CLASS_ALIAS_ANNOTATION,
|
|
920
|
+
.location = location,
|
|
921
|
+
},
|
|
922
|
+
.prefix_location = prefix_location,
|
|
923
|
+
.keyword_location = keyword_location,
|
|
924
|
+
.type_name = type_name,
|
|
925
|
+
.type_name_location = type_name_location,
|
|
926
|
+
};
|
|
927
|
+
|
|
928
|
+
return instance;
|
|
929
|
+
}
|
|
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) {
|
|
932
|
+
rbs_ast_ruby_annotations_colon_method_type_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_colon_method_type_annotation_t);
|
|
933
|
+
|
|
934
|
+
*instance = (rbs_ast_ruby_annotations_colon_method_type_annotation_t) {
|
|
935
|
+
.base = (rbs_node_t) {
|
|
936
|
+
.type = RBS_AST_RUBY_ANNOTATIONS_COLON_METHOD_TYPE_ANNOTATION,
|
|
937
|
+
.location = location,
|
|
938
|
+
},
|
|
939
|
+
.prefix_location = prefix_location,
|
|
940
|
+
.annotations = annotations,
|
|
941
|
+
.method_type = method_type,
|
|
942
|
+
};
|
|
943
|
+
|
|
944
|
+
return instance;
|
|
945
|
+
}
|
|
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) {
|
|
967
|
+
rbs_ast_ruby_annotations_instance_variable_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_instance_variable_annotation_t);
|
|
968
|
+
|
|
969
|
+
*instance = (rbs_ast_ruby_annotations_instance_variable_annotation_t) {
|
|
970
|
+
.base = (rbs_node_t) {
|
|
971
|
+
.type = RBS_AST_RUBY_ANNOTATIONS_INSTANCE_VARIABLE_ANNOTATION,
|
|
972
|
+
.location = location,
|
|
973
|
+
},
|
|
974
|
+
.prefix_location = prefix_location,
|
|
975
|
+
.ivar_name = ivar_name,
|
|
976
|
+
.ivar_name_location = ivar_name_location,
|
|
977
|
+
.colon_location = colon_location,
|
|
978
|
+
.type = type,
|
|
979
|
+
.comment_location = comment_location,
|
|
980
|
+
};
|
|
981
|
+
|
|
982
|
+
return instance;
|
|
983
|
+
}
|
|
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) {
|
|
986
|
+
rbs_ast_ruby_annotations_method_types_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_method_types_annotation_t);
|
|
987
|
+
|
|
988
|
+
*instance = (rbs_ast_ruby_annotations_method_types_annotation_t) {
|
|
989
|
+
.base = (rbs_node_t) {
|
|
990
|
+
.type = RBS_AST_RUBY_ANNOTATIONS_METHOD_TYPES_ANNOTATION,
|
|
991
|
+
.location = location,
|
|
992
|
+
},
|
|
993
|
+
.prefix_location = prefix_location,
|
|
994
|
+
.overloads = overloads,
|
|
995
|
+
.vertical_bar_locations = vertical_bar_locations,
|
|
996
|
+
.dot3_location = dot3_location,
|
|
997
|
+
};
|
|
998
|
+
|
|
999
|
+
return instance;
|
|
1000
|
+
}
|
|
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) {
|
|
1003
|
+
rbs_ast_ruby_annotations_module_alias_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_module_alias_annotation_t);
|
|
1004
|
+
|
|
1005
|
+
*instance = (rbs_ast_ruby_annotations_module_alias_annotation_t) {
|
|
1006
|
+
.base = (rbs_node_t) {
|
|
1007
|
+
.type = RBS_AST_RUBY_ANNOTATIONS_MODULE_ALIAS_ANNOTATION,
|
|
1008
|
+
.location = location,
|
|
1009
|
+
},
|
|
1010
|
+
.prefix_location = prefix_location,
|
|
1011
|
+
.keyword_location = keyword_location,
|
|
1012
|
+
.type_name = type_name,
|
|
1013
|
+
.type_name_location = type_name_location,
|
|
1014
|
+
};
|
|
1015
|
+
|
|
1016
|
+
return instance;
|
|
1017
|
+
}
|
|
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) {
|
|
1020
|
+
rbs_ast_ruby_annotations_node_type_assertion_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_node_type_assertion_t);
|
|
1021
|
+
|
|
1022
|
+
*instance = (rbs_ast_ruby_annotations_node_type_assertion_t) {
|
|
1023
|
+
.base = (rbs_node_t) {
|
|
1024
|
+
.type = RBS_AST_RUBY_ANNOTATIONS_NODE_TYPE_ASSERTION,
|
|
1025
|
+
.location = location,
|
|
1026
|
+
},
|
|
1027
|
+
.prefix_location = prefix_location,
|
|
1028
|
+
.type = type,
|
|
1029
|
+
};
|
|
1030
|
+
|
|
1031
|
+
return instance;
|
|
1032
|
+
}
|
|
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) {
|
|
1053
|
+
rbs_ast_ruby_annotations_return_type_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_return_type_annotation_t);
|
|
1054
|
+
|
|
1055
|
+
*instance = (rbs_ast_ruby_annotations_return_type_annotation_t) {
|
|
1056
|
+
.base = (rbs_node_t) {
|
|
1057
|
+
.type = RBS_AST_RUBY_ANNOTATIONS_RETURN_TYPE_ANNOTATION,
|
|
1058
|
+
.location = location,
|
|
1059
|
+
},
|
|
1060
|
+
.prefix_location = prefix_location,
|
|
1061
|
+
.return_location = return_location,
|
|
1062
|
+
.colon_location = colon_location,
|
|
1063
|
+
.return_type = return_type,
|
|
1064
|
+
.comment_location = comment_location,
|
|
1065
|
+
};
|
|
1066
|
+
|
|
1067
|
+
return instance;
|
|
1068
|
+
}
|
|
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) {
|
|
1071
|
+
rbs_ast_ruby_annotations_skip_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_skip_annotation_t);
|
|
1072
|
+
|
|
1073
|
+
*instance = (rbs_ast_ruby_annotations_skip_annotation_t) {
|
|
1074
|
+
.base = (rbs_node_t) {
|
|
1075
|
+
.type = RBS_AST_RUBY_ANNOTATIONS_SKIP_ANNOTATION,
|
|
1076
|
+
.location = location,
|
|
1077
|
+
},
|
|
1078
|
+
.prefix_location = prefix_location,
|
|
1079
|
+
.skip_location = skip_location,
|
|
1080
|
+
.comment_location = comment_location,
|
|
1081
|
+
};
|
|
1082
|
+
|
|
1083
|
+
return instance;
|
|
1084
|
+
}
|
|
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) {
|
|
1106
|
+
rbs_ast_ruby_annotations_type_application_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_type_application_annotation_t);
|
|
1107
|
+
|
|
1108
|
+
*instance = (rbs_ast_ruby_annotations_type_application_annotation_t) {
|
|
1109
|
+
.base = (rbs_node_t) {
|
|
1110
|
+
.type = RBS_AST_RUBY_ANNOTATIONS_TYPE_APPLICATION_ANNOTATION,
|
|
1111
|
+
.location = location,
|
|
1112
|
+
},
|
|
1113
|
+
.prefix_location = prefix_location,
|
|
1114
|
+
.type_args = type_args,
|
|
1115
|
+
.close_bracket_location = close_bracket_location,
|
|
1116
|
+
.comma_locations = comma_locations,
|
|
1117
|
+
};
|
|
1118
|
+
|
|
1119
|
+
return instance;
|
|
1120
|
+
}
|
|
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) {
|
|
794
1123
|
rbs_ast_string_t *instance = rbs_allocator_alloc(allocator, rbs_ast_string_t);
|
|
795
1124
|
|
|
796
1125
|
*instance = (rbs_ast_string_t) {
|
|
@@ -803,8 +1132,8 @@ rbs_ast_string_t *rbs_ast_string_new(rbs_allocator_t *allocator, rbs_location_t
|
|
|
803
1132
|
|
|
804
1133
|
return instance;
|
|
805
1134
|
}
|
|
806
|
-
#line
|
|
807
|
-
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) {
|
|
808
1137
|
rbs_ast_type_param_t *instance = rbs_allocator_alloc(allocator, rbs_ast_type_param_t);
|
|
809
1138
|
|
|
810
1139
|
*instance = (rbs_ast_type_param_t) {
|
|
@@ -815,14 +1144,21 @@ rbs_ast_type_param_t *rbs_ast_type_param_new(rbs_allocator_t *allocator, rbs_loc
|
|
|
815
1144
|
.name = name,
|
|
816
1145
|
.variance = variance,
|
|
817
1146
|
.upper_bound = upper_bound,
|
|
1147
|
+
.lower_bound = lower_bound,
|
|
818
1148
|
.default_type = default_type,
|
|
819
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,
|
|
820
1156
|
};
|
|
821
1157
|
|
|
822
1158
|
return instance;
|
|
823
1159
|
}
|
|
824
|
-
#line
|
|
825
|
-
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) {
|
|
826
1162
|
rbs_method_type_t *instance = rbs_allocator_alloc(allocator, rbs_method_type_t);
|
|
827
1163
|
|
|
828
1164
|
*instance = (rbs_method_type_t) {
|
|
@@ -833,12 +1169,14 @@ rbs_method_type_t *rbs_method_type_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
833
1169
|
.type_params = type_params,
|
|
834
1170
|
.type = type,
|
|
835
1171
|
.block = block,
|
|
1172
|
+
.type_range = type_range,
|
|
1173
|
+
.type_params_range = RBS_LOCATION_NULL_RANGE,
|
|
836
1174
|
};
|
|
837
1175
|
|
|
838
1176
|
return instance;
|
|
839
1177
|
}
|
|
840
|
-
#line
|
|
841
|
-
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) {
|
|
842
1180
|
rbs_namespace_t *instance = rbs_allocator_alloc(allocator, rbs_namespace_t);
|
|
843
1181
|
|
|
844
1182
|
*instance = (rbs_namespace_t) {
|
|
@@ -852,8 +1190,8 @@ rbs_namespace_t *rbs_namespace_new(rbs_allocator_t *allocator, rbs_location_t *l
|
|
|
852
1190
|
|
|
853
1191
|
return instance;
|
|
854
1192
|
}
|
|
855
|
-
#line
|
|
856
|
-
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) {
|
|
857
1195
|
rbs_signature_t *instance = rbs_allocator_alloc(allocator, rbs_signature_t);
|
|
858
1196
|
|
|
859
1197
|
*instance = (rbs_signature_t) {
|
|
@@ -867,8 +1205,8 @@ rbs_signature_t *rbs_signature_new(rbs_allocator_t *allocator, rbs_location_t *l
|
|
|
867
1205
|
|
|
868
1206
|
return instance;
|
|
869
1207
|
}
|
|
870
|
-
#line
|
|
871
|
-
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) {
|
|
872
1210
|
rbs_type_name_t *instance = rbs_allocator_alloc(allocator, rbs_type_name_t);
|
|
873
1211
|
|
|
874
1212
|
*instance = (rbs_type_name_t) {
|
|
@@ -882,8 +1220,8 @@ rbs_type_name_t *rbs_type_name_new(rbs_allocator_t *allocator, rbs_location_t *l
|
|
|
882
1220
|
|
|
883
1221
|
return instance;
|
|
884
1222
|
}
|
|
885
|
-
#line
|
|
886
|
-
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) {
|
|
887
1225
|
rbs_types_alias_t *instance = rbs_allocator_alloc(allocator, rbs_types_alias_t);
|
|
888
1226
|
|
|
889
1227
|
*instance = (rbs_types_alias_t) {
|
|
@@ -893,12 +1231,14 @@ rbs_types_alias_t *rbs_types_alias_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
893
1231
|
},
|
|
894
1232
|
.name = name,
|
|
895
1233
|
.args = args,
|
|
1234
|
+
.name_range = name_range,
|
|
1235
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
896
1236
|
};
|
|
897
1237
|
|
|
898
1238
|
return instance;
|
|
899
1239
|
}
|
|
900
|
-
#line
|
|
901
|
-
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) {
|
|
902
1242
|
rbs_types_bases_any_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_any_t);
|
|
903
1243
|
|
|
904
1244
|
*instance = (rbs_types_bases_any_t) {
|
|
@@ -911,8 +1251,8 @@ rbs_types_bases_any_t *rbs_types_bases_any_new(rbs_allocator_t *allocator, rbs_l
|
|
|
911
1251
|
|
|
912
1252
|
return instance;
|
|
913
1253
|
}
|
|
914
|
-
#line
|
|
915
|
-
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) {
|
|
916
1256
|
rbs_types_bases_bool_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_bool_t);
|
|
917
1257
|
|
|
918
1258
|
*instance = (rbs_types_bases_bool_t) {
|
|
@@ -924,8 +1264,8 @@ rbs_types_bases_bool_t *rbs_types_bases_bool_new(rbs_allocator_t *allocator, rbs
|
|
|
924
1264
|
|
|
925
1265
|
return instance;
|
|
926
1266
|
}
|
|
927
|
-
#line
|
|
928
|
-
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) {
|
|
929
1269
|
rbs_types_bases_bottom_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_bottom_t);
|
|
930
1270
|
|
|
931
1271
|
*instance = (rbs_types_bases_bottom_t) {
|
|
@@ -937,8 +1277,8 @@ rbs_types_bases_bottom_t *rbs_types_bases_bottom_new(rbs_allocator_t *allocator,
|
|
|
937
1277
|
|
|
938
1278
|
return instance;
|
|
939
1279
|
}
|
|
940
|
-
#line
|
|
941
|
-
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) {
|
|
942
1282
|
rbs_types_bases_class_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_class_t);
|
|
943
1283
|
|
|
944
1284
|
*instance = (rbs_types_bases_class_t) {
|
|
@@ -950,8 +1290,8 @@ rbs_types_bases_class_t *rbs_types_bases_class_new(rbs_allocator_t *allocator, r
|
|
|
950
1290
|
|
|
951
1291
|
return instance;
|
|
952
1292
|
}
|
|
953
|
-
#line
|
|
954
|
-
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) {
|
|
955
1295
|
rbs_types_bases_instance_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_instance_t);
|
|
956
1296
|
|
|
957
1297
|
*instance = (rbs_types_bases_instance_t) {
|
|
@@ -963,8 +1303,8 @@ rbs_types_bases_instance_t *rbs_types_bases_instance_new(rbs_allocator_t *alloca
|
|
|
963
1303
|
|
|
964
1304
|
return instance;
|
|
965
1305
|
}
|
|
966
|
-
#line
|
|
967
|
-
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) {
|
|
968
1308
|
rbs_types_bases_nil_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_nil_t);
|
|
969
1309
|
|
|
970
1310
|
*instance = (rbs_types_bases_nil_t) {
|
|
@@ -976,8 +1316,8 @@ rbs_types_bases_nil_t *rbs_types_bases_nil_new(rbs_allocator_t *allocator, rbs_l
|
|
|
976
1316
|
|
|
977
1317
|
return instance;
|
|
978
1318
|
}
|
|
979
|
-
#line
|
|
980
|
-
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) {
|
|
981
1321
|
rbs_types_bases_self_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_self_t);
|
|
982
1322
|
|
|
983
1323
|
*instance = (rbs_types_bases_self_t) {
|
|
@@ -989,8 +1329,8 @@ rbs_types_bases_self_t *rbs_types_bases_self_new(rbs_allocator_t *allocator, rbs
|
|
|
989
1329
|
|
|
990
1330
|
return instance;
|
|
991
1331
|
}
|
|
992
|
-
#line
|
|
993
|
-
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) {
|
|
994
1334
|
rbs_types_bases_top_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_top_t);
|
|
995
1335
|
|
|
996
1336
|
*instance = (rbs_types_bases_top_t) {
|
|
@@ -1002,8 +1342,8 @@ rbs_types_bases_top_t *rbs_types_bases_top_new(rbs_allocator_t *allocator, rbs_l
|
|
|
1002
1342
|
|
|
1003
1343
|
return instance;
|
|
1004
1344
|
}
|
|
1005
|
-
#line
|
|
1006
|
-
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) {
|
|
1007
1347
|
rbs_types_bases_void_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_void_t);
|
|
1008
1348
|
|
|
1009
1349
|
*instance = (rbs_types_bases_void_t) {
|
|
@@ -1015,8 +1355,8 @@ rbs_types_bases_void_t *rbs_types_bases_void_new(rbs_allocator_t *allocator, rbs
|
|
|
1015
1355
|
|
|
1016
1356
|
return instance;
|
|
1017
1357
|
}
|
|
1018
|
-
#line
|
|
1019
|
-
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) {
|
|
1020
1360
|
rbs_types_block_t *instance = rbs_allocator_alloc(allocator, rbs_types_block_t);
|
|
1021
1361
|
|
|
1022
1362
|
*instance = (rbs_types_block_t) {
|
|
@@ -1031,8 +1371,8 @@ rbs_types_block_t *rbs_types_block_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
1031
1371
|
|
|
1032
1372
|
return instance;
|
|
1033
1373
|
}
|
|
1034
|
-
#line
|
|
1035
|
-
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) {
|
|
1036
1376
|
rbs_types_class_instance_t *instance = rbs_allocator_alloc(allocator, rbs_types_class_instance_t);
|
|
1037
1377
|
|
|
1038
1378
|
*instance = (rbs_types_class_instance_t) {
|
|
@@ -1042,12 +1382,14 @@ rbs_types_class_instance_t *rbs_types_class_instance_new(rbs_allocator_t *alloca
|
|
|
1042
1382
|
},
|
|
1043
1383
|
.name = name,
|
|
1044
1384
|
.args = args,
|
|
1385
|
+
.name_range = name_range,
|
|
1386
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
1045
1387
|
};
|
|
1046
1388
|
|
|
1047
1389
|
return instance;
|
|
1048
1390
|
}
|
|
1049
|
-
#line
|
|
1050
|
-
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) {
|
|
1051
1393
|
rbs_types_class_singleton_t *instance = rbs_allocator_alloc(allocator, rbs_types_class_singleton_t);
|
|
1052
1394
|
|
|
1053
1395
|
*instance = (rbs_types_class_singleton_t) {
|
|
@@ -1056,12 +1398,15 @@ rbs_types_class_singleton_t *rbs_types_class_singleton_new(rbs_allocator_t *allo
|
|
|
1056
1398
|
.location = location,
|
|
1057
1399
|
},
|
|
1058
1400
|
.name = name,
|
|
1401
|
+
.args = args,
|
|
1402
|
+
.name_range = name_range,
|
|
1403
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
1059
1404
|
};
|
|
1060
1405
|
|
|
1061
1406
|
return instance;
|
|
1062
1407
|
}
|
|
1063
|
-
#line
|
|
1064
|
-
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) {
|
|
1065
1410
|
rbs_types_function_t *instance = rbs_allocator_alloc(allocator, rbs_types_function_t);
|
|
1066
1411
|
|
|
1067
1412
|
*instance = (rbs_types_function_t) {
|
|
@@ -1081,8 +1426,8 @@ rbs_types_function_t *rbs_types_function_new(rbs_allocator_t *allocator, rbs_loc
|
|
|
1081
1426
|
|
|
1082
1427
|
return instance;
|
|
1083
1428
|
}
|
|
1084
|
-
#line
|
|
1085
|
-
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) {
|
|
1086
1431
|
rbs_types_function_param_t *instance = rbs_allocator_alloc(allocator, rbs_types_function_param_t);
|
|
1087
1432
|
|
|
1088
1433
|
*instance = (rbs_types_function_param_t) {
|
|
@@ -1092,12 +1437,13 @@ rbs_types_function_param_t *rbs_types_function_param_new(rbs_allocator_t *alloca
|
|
|
1092
1437
|
},
|
|
1093
1438
|
.type = type,
|
|
1094
1439
|
.name = name,
|
|
1440
|
+
.name_range = RBS_LOCATION_NULL_RANGE,
|
|
1095
1441
|
};
|
|
1096
1442
|
|
|
1097
1443
|
return instance;
|
|
1098
1444
|
}
|
|
1099
|
-
#line
|
|
1100
|
-
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) {
|
|
1101
1447
|
rbs_types_interface_t *instance = rbs_allocator_alloc(allocator, rbs_types_interface_t);
|
|
1102
1448
|
|
|
1103
1449
|
*instance = (rbs_types_interface_t) {
|
|
@@ -1107,12 +1453,14 @@ rbs_types_interface_t *rbs_types_interface_new(rbs_allocator_t *allocator, rbs_l
|
|
|
1107
1453
|
},
|
|
1108
1454
|
.name = name,
|
|
1109
1455
|
.args = args,
|
|
1456
|
+
.name_range = name_range,
|
|
1457
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
1110
1458
|
};
|
|
1111
1459
|
|
|
1112
1460
|
return instance;
|
|
1113
1461
|
}
|
|
1114
|
-
#line
|
|
1115
|
-
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) {
|
|
1116
1464
|
rbs_types_intersection_t *instance = rbs_allocator_alloc(allocator, rbs_types_intersection_t);
|
|
1117
1465
|
|
|
1118
1466
|
*instance = (rbs_types_intersection_t) {
|
|
@@ -1125,8 +1473,8 @@ rbs_types_intersection_t *rbs_types_intersection_new(rbs_allocator_t *allocator,
|
|
|
1125
1473
|
|
|
1126
1474
|
return instance;
|
|
1127
1475
|
}
|
|
1128
|
-
#line
|
|
1129
|
-
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) {
|
|
1130
1478
|
rbs_types_literal_t *instance = rbs_allocator_alloc(allocator, rbs_types_literal_t);
|
|
1131
1479
|
|
|
1132
1480
|
*instance = (rbs_types_literal_t) {
|
|
@@ -1139,8 +1487,8 @@ rbs_types_literal_t *rbs_types_literal_new(rbs_allocator_t *allocator, rbs_locat
|
|
|
1139
1487
|
|
|
1140
1488
|
return instance;
|
|
1141
1489
|
}
|
|
1142
|
-
#line
|
|
1143
|
-
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) {
|
|
1144
1492
|
rbs_types_optional_t *instance = rbs_allocator_alloc(allocator, rbs_types_optional_t);
|
|
1145
1493
|
|
|
1146
1494
|
*instance = (rbs_types_optional_t) {
|
|
@@ -1153,8 +1501,8 @@ rbs_types_optional_t *rbs_types_optional_new(rbs_allocator_t *allocator, rbs_loc
|
|
|
1153
1501
|
|
|
1154
1502
|
return instance;
|
|
1155
1503
|
}
|
|
1156
|
-
#line
|
|
1157
|
-
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) {
|
|
1158
1506
|
rbs_types_proc_t *instance = rbs_allocator_alloc(allocator, rbs_types_proc_t);
|
|
1159
1507
|
|
|
1160
1508
|
*instance = (rbs_types_proc_t) {
|
|
@@ -1169,8 +1517,8 @@ rbs_types_proc_t *rbs_types_proc_new(rbs_allocator_t *allocator, rbs_location_t
|
|
|
1169
1517
|
|
|
1170
1518
|
return instance;
|
|
1171
1519
|
}
|
|
1172
|
-
#line
|
|
1173
|
-
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) {
|
|
1174
1522
|
rbs_types_record_t *instance = rbs_allocator_alloc(allocator, rbs_types_record_t);
|
|
1175
1523
|
|
|
1176
1524
|
*instance = (rbs_types_record_t) {
|
|
@@ -1183,8 +1531,8 @@ rbs_types_record_t *rbs_types_record_new(rbs_allocator_t *allocator, rbs_locatio
|
|
|
1183
1531
|
|
|
1184
1532
|
return instance;
|
|
1185
1533
|
}
|
|
1186
|
-
#line
|
|
1187
|
-
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) {
|
|
1188
1536
|
rbs_types_record_field_type_t *instance = rbs_allocator_alloc(allocator, rbs_types_record_field_type_t);
|
|
1189
1537
|
|
|
1190
1538
|
*instance = (rbs_types_record_field_type_t) {
|
|
@@ -1198,8 +1546,8 @@ rbs_types_record_field_type_t *rbs_types_record_field_type_new(rbs_allocator_t *
|
|
|
1198
1546
|
|
|
1199
1547
|
return instance;
|
|
1200
1548
|
}
|
|
1201
|
-
#line
|
|
1202
|
-
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) {
|
|
1203
1551
|
rbs_types_tuple_t *instance = rbs_allocator_alloc(allocator, rbs_types_tuple_t);
|
|
1204
1552
|
|
|
1205
1553
|
*instance = (rbs_types_tuple_t) {
|
|
@@ -1212,8 +1560,8 @@ rbs_types_tuple_t *rbs_types_tuple_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
1212
1560
|
|
|
1213
1561
|
return instance;
|
|
1214
1562
|
}
|
|
1215
|
-
#line
|
|
1216
|
-
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) {
|
|
1217
1565
|
rbs_types_union_t *instance = rbs_allocator_alloc(allocator, rbs_types_union_t);
|
|
1218
1566
|
|
|
1219
1567
|
*instance = (rbs_types_union_t) {
|
|
@@ -1226,8 +1574,8 @@ rbs_types_union_t *rbs_types_union_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
1226
1574
|
|
|
1227
1575
|
return instance;
|
|
1228
1576
|
}
|
|
1229
|
-
#line
|
|
1230
|
-
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) {
|
|
1231
1579
|
rbs_types_untyped_function_t *instance = rbs_allocator_alloc(allocator, rbs_types_untyped_function_t);
|
|
1232
1580
|
|
|
1233
1581
|
*instance = (rbs_types_untyped_function_t) {
|
|
@@ -1240,8 +1588,8 @@ rbs_types_untyped_function_t *rbs_types_untyped_function_new(rbs_allocator_t *al
|
|
|
1240
1588
|
|
|
1241
1589
|
return instance;
|
|
1242
1590
|
}
|
|
1243
|
-
#line
|
|
1244
|
-
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) {
|
|
1245
1593
|
rbs_types_variable_t *instance = rbs_allocator_alloc(allocator, rbs_types_variable_t);
|
|
1246
1594
|
|
|
1247
1595
|
*instance = (rbs_types_variable_t) {
|