rbs 4.0.0.dev.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 +18 -11
- data/.github/workflows/comments.yml +5 -3
- data/.github/workflows/dependabot.yml +2 -2
- data/.github/workflows/ruby.yml +27 -34
- data/.github/workflows/rust.yml +95 -0
- data/.github/workflows/typecheck.yml +2 -2
- data/.github/workflows/windows.yml +2 -2
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +323 -0
- data/README.md +1 -1
- data/Rakefile +43 -33
- data/Steepfile +1 -0
- data/config.yml +426 -24
- data/core/array.rbs +307 -227
- 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 +55 -34
- data/core/complex.rbs +104 -78
- data/core/dir.rbs +61 -49
- data/core/encoding.rbs +12 -15
- data/core/enumerable.rbs +179 -87
- data/core/enumerator/arithmetic_sequence.rbs +70 -0
- data/core/enumerator.rbs +65 -2
- data/core/errno.rbs +11 -2
- data/core/errors.rbs +58 -29
- data/core/exception.rbs +13 -13
- data/core/fiber.rbs +74 -54
- data/core/file.rbs +280 -177
- data/core/file_test.rbs +3 -3
- data/core/float.rbs +257 -92
- data/core/gc.rbs +425 -281
- data/core/hash.rbs +1045 -739
- data/core/integer.rbs +135 -137
- data/core/io/buffer.rbs +53 -42
- data/core/io/wait.rbs +13 -35
- data/core/io.rbs +192 -144
- data/core/kernel.rbs +216 -155
- data/core/marshal.rbs +4 -4
- data/core/match_data.rbs +15 -13
- data/core/math.rbs +107 -66
- data/core/method.rbs +69 -33
- data/core/module.rbs +244 -106
- data/core/nil_class.rbs +7 -6
- data/core/numeric.rbs +74 -63
- data/core/object.rbs +9 -11
- data/core/object_space.rbs +30 -23
- data/core/pathname.rbs +1322 -0
- data/core/proc.rbs +95 -58
- data/core/process.rbs +222 -202
- data/core/ractor.rbs +371 -515
- data/core/random.rbs +21 -3
- data/core/range.rbs +159 -57
- data/core/rational.rbs +60 -89
- data/core/rbs/unnamed/argf.rbs +60 -53
- data/core/rbs/unnamed/env_class.rbs +19 -14
- data/core/rbs/unnamed/main_class.rbs +123 -0
- data/core/rbs/unnamed/random.rbs +11 -118
- data/core/regexp.rbs +258 -214
- data/core/ruby.rbs +53 -0
- data/core/ruby_vm.rbs +38 -34
- data/core/rubygems/config_file.rbs +5 -5
- data/core/rubygems/errors.rbs +4 -71
- data/core/rubygems/requirement.rbs +5 -5
- data/core/rubygems/rubygems.rbs +16 -82
- data/core/rubygems/version.rbs +2 -3
- data/core/set.rbs +490 -360
- data/core/signal.rbs +26 -16
- data/core/string.rbs +3234 -1285
- data/core/struct.rbs +27 -26
- data/core/symbol.rbs +41 -34
- data/core/thread.rbs +135 -67
- data/core/time.rbs +81 -50
- data/core/trace_point.rbs +41 -35
- data/core/true_class.rbs +2 -2
- data/core/unbound_method.rbs +24 -16
- data/core/warning.rbs +7 -7
- data/docs/aliases.md +79 -0
- data/docs/collection.md +3 -3
- data/docs/config.md +171 -0
- data/docs/encoding.md +56 -0
- data/docs/gem.md +0 -1
- data/docs/inline.md +576 -0
- data/docs/sigs.md +3 -3
- 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 +544 -116
- data/ext/rbs_extension/ast_translation.h +3 -0
- data/ext/rbs_extension/class_constants.c +16 -2
- data/ext/rbs_extension/class_constants.h +8 -0
- data/ext/rbs_extension/extconf.rb +5 -1
- data/ext/rbs_extension/legacy_location.c +33 -56
- data/ext/rbs_extension/legacy_location.h +37 -0
- data/ext/rbs_extension/main.c +44 -35
- data/include/rbs/ast.h +448 -173
- data/include/rbs/defines.h +27 -0
- data/include/rbs/lexer.h +30 -11
- data/include/rbs/location.h +25 -44
- data/include/rbs/parser.h +6 -6
- data/include/rbs/string.h +0 -2
- data/include/rbs/util/rbs_allocator.h +34 -13
- data/include/rbs/util/rbs_assert.h +12 -1
- data/include/rbs/util/rbs_constant_pool.h +0 -3
- data/include/rbs/util/rbs_encoding.h +2 -0
- data/include/rbs/util/rbs_unescape.h +2 -1
- 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 +293 -3
- data/lib/rbs/ast/ruby/comment_block.rb +24 -0
- data/lib/rbs/ast/ruby/declarations.rb +198 -3
- data/lib/rbs/ast/ruby/helpers/constant_helper.rb +4 -0
- data/lib/rbs/ast/ruby/members.rb +532 -22
- data/lib/rbs/ast/type_param.rb +24 -4
- data/lib/rbs/buffer.rb +20 -15
- data/lib/rbs/cli/diff.rb +16 -15
- data/lib/rbs/cli/validate.rb +38 -106
- data/lib/rbs/cli.rb +52 -19
- data/lib/rbs/collection/config/lockfile_generator.rb +14 -2
- data/lib/rbs/collection/sources/git.rb +1 -0
- data/lib/rbs/definition.rb +1 -1
- data/lib/rbs/definition_builder/ancestor_builder.rb +62 -9
- data/lib/rbs/definition_builder/method_builder.rb +20 -0
- data/lib/rbs/definition_builder.rb +147 -25
- data/lib/rbs/diff.rb +7 -1
- data/lib/rbs/environment.rb +227 -74
- data/lib/rbs/environment_loader.rb +0 -6
- data/lib/rbs/errors.rb +27 -18
- data/lib/rbs/inline_parser.rb +342 -6
- data/lib/rbs/location_aux.rb +1 -1
- data/lib/rbs/locator.rb +5 -1
- data/lib/rbs/method_type.rb +5 -3
- data/lib/rbs/parser_aux.rb +20 -7
- 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 +8 -0
- data/lib/rbs/resolver/constant_resolver.rb +2 -2
- data/lib/rbs/resolver/type_name_resolver.rb +116 -38
- data/lib/rbs/subtractor.rb +3 -1
- data/lib/rbs/test/type_check.rb +19 -2
- data/lib/rbs/type_name.rb +1 -1
- data/lib/rbs/types.rb +88 -78
- 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 +1 -2
- data/lib/rdoc/discover.rb +1 -1
- data/lib/rdoc_plugin/parser.rb +1 -1
- data/rbs.gemspec +4 -3
- 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/ast/ruby/annotations.rbs +315 -4
- data/sig/ast/ruby/comment_block.rbs +8 -0
- data/sig/ast/ruby/declarations.rbs +102 -4
- data/sig/ast/ruby/members.rbs +108 -2
- 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 -1
- data/sig/definition_builder.rbs +2 -0
- data/sig/environment.rbs +70 -12
- data/sig/errors.rbs +13 -14
- data/sig/inline_parser.rbs +39 -2
- data/sig/locator.rbs +0 -2
- data/sig/manifest.yaml +0 -1
- data/sig/method_builder.rbs +3 -1
- data/sig/parser.rbs +31 -13
- data/sig/prototype/helpers.rbs +2 -0
- data/sig/resolver/type_name_resolver.rbs +35 -7
- data/sig/source.rbs +3 -3
- data/sig/type_param.rbs +13 -8
- 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 +410 -153
- data/src/lexer.c +1392 -1313
- data/src/lexer.re +3 -0
- data/src/lexstate.c +58 -37
- data/src/location.c +8 -48
- data/src/parser.c +977 -516
- data/src/string.c +0 -48
- data/src/util/rbs_allocator.c +89 -71
- data/src/util/rbs_assert.c +1 -1
- data/src/util/rbs_buffer.c +2 -2
- data/src/util/rbs_constant_pool.c +10 -14
- data/src/util/rbs_encoding.c +4 -8
- data/src/util/rbs_unescape.c +56 -20
- data/stdlib/bigdecimal/0/big_decimal.rbs +116 -98
- data/stdlib/bigdecimal-math/0/big_math.rbs +169 -8
- data/stdlib/cgi/0/core.rbs +9 -393
- data/stdlib/cgi/0/manifest.yaml +1 -0
- data/stdlib/cgi-escape/0/escape.rbs +171 -0
- data/stdlib/coverage/0/coverage.rbs +7 -4
- data/stdlib/date/0/date.rbs +92 -79
- data/stdlib/date/0/date_time.rbs +25 -24
- data/stdlib/delegate/0/delegator.rbs +10 -7
- 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 +748 -347
- data/stdlib/etc/0/etc.rbs +55 -50
- data/stdlib/fileutils/0/fileutils.rbs +158 -139
- data/stdlib/forwardable/0/forwardable.rbs +13 -10
- data/stdlib/io-console/0/io-console.rbs +2 -2
- data/stdlib/json/0/json.rbs +217 -136
- data/stdlib/monitor/0/monitor.rbs +3 -3
- data/stdlib/net-http/0/net-http.rbs +162 -134
- data/stdlib/objspace/0/objspace.rbs +17 -34
- data/stdlib/open-uri/0/open-uri.rbs +48 -8
- data/stdlib/open3/0/open3.rbs +469 -10
- data/stdlib/openssl/0/openssl.rbs +475 -357
- data/stdlib/optparse/0/optparse.rbs +26 -17
- data/stdlib/pathname/0/pathname.rbs +11 -1381
- 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 +65 -12
- 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/rdoc.rbs +1 -1
- data/stdlib/rdoc/0/store.rbs +1 -1
- data/stdlib/resolv/0/resolv.rbs +25 -68
- data/stdlib/ripper/0/ripper.rbs +22 -19
- 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/singleton/0/singleton.rbs +3 -0
- 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 +23 -10
- data/stdlib/socket/0/tcp_server.rbs +1 -1
- data/stdlib/socket/0/tcp_socket.rbs +11 -3
- data/stdlib/socket/0/udp_socket.rbs +1 -1
- data/stdlib/socket/0/unix_server.rbs +1 -1
- data/stdlib/stringio/0/stringio.rbs +1177 -85
- data/stdlib/strscan/0/string_scanner.rbs +27 -25
- data/stdlib/tempfile/0/tempfile.rbs +25 -21
- data/stdlib/time/0/time.rbs +8 -6
- data/stdlib/timeout/0/timeout.rbs +63 -7
- data/stdlib/tsort/0/cyclic.rbs +3 -0
- data/stdlib/tsort/0/tsort.rbs +7 -6
- data/stdlib/uri/0/common.rbs +42 -20
- data/stdlib/uri/0/file.rbs +3 -3
- data/stdlib/uri/0/generic.rbs +26 -18
- 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 +12 -12
- 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
- data/stdlib/zlib/0/zstream.rbs +1 -0
- metadata +50 -6
data/src/ast.c
CHANGED
|
@@ -75,16 +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";
|
|
78
82
|
case RBS_AST_RUBY_ANNOTATIONS_COLON_METHOD_TYPE_ANNOTATION:
|
|
79
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";
|
|
80
88
|
case RBS_AST_RUBY_ANNOTATIONS_METHOD_TYPES_ANNOTATION:
|
|
81
89
|
return "RBS::AST::Ruby::Annotations::MethodTypesAnnotation";
|
|
90
|
+
case RBS_AST_RUBY_ANNOTATIONS_MODULE_ALIAS_ANNOTATION:
|
|
91
|
+
return "RBS::AST::Ruby::Annotations::ModuleAliasAnnotation";
|
|
82
92
|
case RBS_AST_RUBY_ANNOTATIONS_NODE_TYPE_ASSERTION:
|
|
83
93
|
return "RBS::AST::Ruby::Annotations::NodeTypeAssertion";
|
|
94
|
+
case RBS_AST_RUBY_ANNOTATIONS_PARAM_TYPE_ANNOTATION:
|
|
95
|
+
return "RBS::AST::Ruby::Annotations::ParamTypeAnnotation";
|
|
84
96
|
case RBS_AST_RUBY_ANNOTATIONS_RETURN_TYPE_ANNOTATION:
|
|
85
97
|
return "RBS::AST::Ruby::Annotations::ReturnTypeAnnotation";
|
|
86
98
|
case RBS_AST_RUBY_ANNOTATIONS_SKIP_ANNOTATION:
|
|
87
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";
|
|
88
104
|
case RBS_AST_STRING:
|
|
89
105
|
return "RBS::AST::String";
|
|
90
106
|
case RBS_AST_TYPE_PARAM:
|
|
@@ -209,8 +225,6 @@ bool rbs_node_equal(rbs_node_t *lhs, rbs_node_t *rhs) {
|
|
|
209
225
|
switch (lhs->type) {
|
|
210
226
|
case RBS_AST_SYMBOL:
|
|
211
227
|
return ((rbs_ast_symbol_t *) lhs)->constant_id == ((rbs_ast_symbol_t *) rhs)->constant_id;
|
|
212
|
-
case RBS_KEYWORD:
|
|
213
|
-
return ((rbs_keyword_t *) lhs)->constant_id == ((rbs_keyword_t *) rhs)->constant_id;
|
|
214
228
|
case RBS_AST_BOOL:
|
|
215
229
|
return ((rbs_ast_bool_t *) lhs)->value == ((rbs_ast_bool_t *) rhs)->value;
|
|
216
230
|
case RBS_AST_INTEGER:
|
|
@@ -262,21 +276,7 @@ rbs_node_t *rbs_hash_get(rbs_hash_t *hash, rbs_node_t *key) {
|
|
|
262
276
|
return node ? node->value : NULL;
|
|
263
277
|
}
|
|
264
278
|
|
|
265
|
-
|
|
266
|
-
rbs_keyword_t *instance = rbs_allocator_alloc(allocator, rbs_keyword_t);
|
|
267
|
-
|
|
268
|
-
*instance = (rbs_keyword_t) {
|
|
269
|
-
.base = (rbs_node_t) {
|
|
270
|
-
.type = RBS_KEYWORD,
|
|
271
|
-
.location = location,
|
|
272
|
-
},
|
|
273
|
-
.constant_id = constant_id,
|
|
274
|
-
};
|
|
275
|
-
|
|
276
|
-
return instance;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
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) {
|
|
280
280
|
rbs_ast_symbol_t *instance = rbs_allocator_alloc(allocator, rbs_ast_symbol_t);
|
|
281
281
|
|
|
282
282
|
*instance = (rbs_ast_symbol_t) {
|
|
@@ -290,8 +290,8 @@ rbs_ast_symbol_t *rbs_ast_symbol_new(rbs_allocator_t *allocator, rbs_location_t
|
|
|
290
290
|
return instance;
|
|
291
291
|
}
|
|
292
292
|
|
|
293
|
-
#line
|
|
294
|
-
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) {
|
|
295
295
|
rbs_ast_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_annotation_t);
|
|
296
296
|
|
|
297
297
|
*instance = (rbs_ast_annotation_t) {
|
|
@@ -304,8 +304,8 @@ rbs_ast_annotation_t *rbs_ast_annotation_new(rbs_allocator_t *allocator, rbs_loc
|
|
|
304
304
|
|
|
305
305
|
return instance;
|
|
306
306
|
}
|
|
307
|
-
#line
|
|
308
|
-
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) {
|
|
309
309
|
rbs_ast_bool_t *instance = rbs_allocator_alloc(allocator, rbs_ast_bool_t);
|
|
310
310
|
|
|
311
311
|
*instance = (rbs_ast_bool_t) {
|
|
@@ -318,8 +318,8 @@ rbs_ast_bool_t *rbs_ast_bool_new(rbs_allocator_t *allocator, rbs_location_t *loc
|
|
|
318
318
|
|
|
319
319
|
return instance;
|
|
320
320
|
}
|
|
321
|
-
#line
|
|
322
|
-
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) {
|
|
323
323
|
rbs_ast_comment_t *instance = rbs_allocator_alloc(allocator, rbs_ast_comment_t);
|
|
324
324
|
|
|
325
325
|
*instance = (rbs_ast_comment_t) {
|
|
@@ -332,8 +332,8 @@ rbs_ast_comment_t *rbs_ast_comment_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
332
332
|
|
|
333
333
|
return instance;
|
|
334
334
|
}
|
|
335
|
-
#line
|
|
336
|
-
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) {
|
|
337
337
|
rbs_ast_declarations_class_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_class_t);
|
|
338
338
|
|
|
339
339
|
*instance = (rbs_ast_declarations_class_t) {
|
|
@@ -347,12 +347,17 @@ rbs_ast_declarations_class_t *rbs_ast_declarations_class_new(rbs_allocator_t *al
|
|
|
347
347
|
.members = members,
|
|
348
348
|
.annotations = annotations,
|
|
349
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,
|
|
350
355
|
};
|
|
351
356
|
|
|
352
357
|
return instance;
|
|
353
358
|
}
|
|
354
|
-
#line
|
|
355
|
-
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) {
|
|
356
361
|
rbs_ast_declarations_class_super_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_class_super_t);
|
|
357
362
|
|
|
358
363
|
*instance = (rbs_ast_declarations_class_super_t) {
|
|
@@ -362,12 +367,14 @@ rbs_ast_declarations_class_super_t *rbs_ast_declarations_class_super_new(rbs_all
|
|
|
362
367
|
},
|
|
363
368
|
.name = name,
|
|
364
369
|
.args = args,
|
|
370
|
+
.name_range = name_range,
|
|
371
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
365
372
|
};
|
|
366
373
|
|
|
367
374
|
return instance;
|
|
368
375
|
}
|
|
369
|
-
#line
|
|
370
|
-
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) {
|
|
371
378
|
rbs_ast_declarations_class_alias_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_class_alias_t);
|
|
372
379
|
|
|
373
380
|
*instance = (rbs_ast_declarations_class_alias_t) {
|
|
@@ -379,12 +386,16 @@ rbs_ast_declarations_class_alias_t *rbs_ast_declarations_class_alias_new(rbs_all
|
|
|
379
386
|
.old_name = old_name,
|
|
380
387
|
.comment = comment,
|
|
381
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,
|
|
382
393
|
};
|
|
383
394
|
|
|
384
395
|
return instance;
|
|
385
396
|
}
|
|
386
|
-
#line
|
|
387
|
-
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) {
|
|
388
399
|
rbs_ast_declarations_constant_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_constant_t);
|
|
389
400
|
|
|
390
401
|
*instance = (rbs_ast_declarations_constant_t) {
|
|
@@ -396,12 +407,14 @@ rbs_ast_declarations_constant_t *rbs_ast_declarations_constant_new(rbs_allocator
|
|
|
396
407
|
.type = type,
|
|
397
408
|
.comment = comment,
|
|
398
409
|
.annotations = annotations,
|
|
410
|
+
.name_range = name_range,
|
|
411
|
+
.colon_range = colon_range,
|
|
399
412
|
};
|
|
400
413
|
|
|
401
414
|
return instance;
|
|
402
415
|
}
|
|
403
|
-
#line
|
|
404
|
-
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) {
|
|
405
418
|
rbs_ast_declarations_global_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_global_t);
|
|
406
419
|
|
|
407
420
|
*instance = (rbs_ast_declarations_global_t) {
|
|
@@ -413,12 +426,14 @@ rbs_ast_declarations_global_t *rbs_ast_declarations_global_new(rbs_allocator_t *
|
|
|
413
426
|
.type = type,
|
|
414
427
|
.comment = comment,
|
|
415
428
|
.annotations = annotations,
|
|
429
|
+
.name_range = name_range,
|
|
430
|
+
.colon_range = colon_range,
|
|
416
431
|
};
|
|
417
432
|
|
|
418
433
|
return instance;
|
|
419
434
|
}
|
|
420
|
-
#line
|
|
421
|
-
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) {
|
|
422
437
|
rbs_ast_declarations_interface_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_interface_t);
|
|
423
438
|
|
|
424
439
|
*instance = (rbs_ast_declarations_interface_t) {
|
|
@@ -431,12 +446,16 @@ rbs_ast_declarations_interface_t *rbs_ast_declarations_interface_new(rbs_allocat
|
|
|
431
446
|
.members = members,
|
|
432
447
|
.annotations = annotations,
|
|
433
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,
|
|
434
453
|
};
|
|
435
454
|
|
|
436
455
|
return instance;
|
|
437
456
|
}
|
|
438
|
-
#line
|
|
439
|
-
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) {
|
|
440
459
|
rbs_ast_declarations_module_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_module_t);
|
|
441
460
|
|
|
442
461
|
*instance = (rbs_ast_declarations_module_t) {
|
|
@@ -450,12 +469,18 @@ rbs_ast_declarations_module_t *rbs_ast_declarations_module_new(rbs_allocator_t *
|
|
|
450
469
|
.members = members,
|
|
451
470
|
.annotations = annotations,
|
|
452
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,
|
|
453
478
|
};
|
|
454
479
|
|
|
455
480
|
return instance;
|
|
456
481
|
}
|
|
457
|
-
#line
|
|
458
|
-
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) {
|
|
459
484
|
rbs_ast_declarations_module_self_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_module_self_t);
|
|
460
485
|
|
|
461
486
|
*instance = (rbs_ast_declarations_module_self_t) {
|
|
@@ -465,12 +490,14 @@ rbs_ast_declarations_module_self_t *rbs_ast_declarations_module_self_new(rbs_all
|
|
|
465
490
|
},
|
|
466
491
|
.name = name,
|
|
467
492
|
.args = args,
|
|
493
|
+
.name_range = name_range,
|
|
494
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
468
495
|
};
|
|
469
496
|
|
|
470
497
|
return instance;
|
|
471
498
|
}
|
|
472
|
-
#line
|
|
473
|
-
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) {
|
|
474
501
|
rbs_ast_declarations_module_alias_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_module_alias_t);
|
|
475
502
|
|
|
476
503
|
*instance = (rbs_ast_declarations_module_alias_t) {
|
|
@@ -482,12 +509,16 @@ rbs_ast_declarations_module_alias_t *rbs_ast_declarations_module_alias_new(rbs_a
|
|
|
482
509
|
.old_name = old_name,
|
|
483
510
|
.comment = comment,
|
|
484
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,
|
|
485
516
|
};
|
|
486
517
|
|
|
487
518
|
return instance;
|
|
488
519
|
}
|
|
489
|
-
#line
|
|
490
|
-
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) {
|
|
491
522
|
rbs_ast_declarations_type_alias_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_type_alias_t);
|
|
492
523
|
|
|
493
524
|
*instance = (rbs_ast_declarations_type_alias_t) {
|
|
@@ -500,12 +531,16 @@ rbs_ast_declarations_type_alias_t *rbs_ast_declarations_type_alias_new(rbs_alloc
|
|
|
500
531
|
.type = type,
|
|
501
532
|
.annotations = annotations,
|
|
502
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,
|
|
503
538
|
};
|
|
504
539
|
|
|
505
540
|
return instance;
|
|
506
541
|
}
|
|
507
|
-
#line
|
|
508
|
-
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) {
|
|
509
544
|
rbs_ast_directives_use_t *instance = rbs_allocator_alloc(allocator, rbs_ast_directives_use_t);
|
|
510
545
|
|
|
511
546
|
*instance = (rbs_ast_directives_use_t) {
|
|
@@ -514,12 +549,13 @@ rbs_ast_directives_use_t *rbs_ast_directives_use_new(rbs_allocator_t *allocator,
|
|
|
514
549
|
.location = location,
|
|
515
550
|
},
|
|
516
551
|
.clauses = clauses,
|
|
552
|
+
.keyword_range = keyword_range,
|
|
517
553
|
};
|
|
518
554
|
|
|
519
555
|
return instance;
|
|
520
556
|
}
|
|
521
|
-
#line
|
|
522
|
-
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) {
|
|
523
559
|
rbs_ast_directives_use_single_clause_t *instance = rbs_allocator_alloc(allocator, rbs_ast_directives_use_single_clause_t);
|
|
524
560
|
|
|
525
561
|
*instance = (rbs_ast_directives_use_single_clause_t) {
|
|
@@ -529,12 +565,15 @@ rbs_ast_directives_use_single_clause_t *rbs_ast_directives_use_single_clause_new
|
|
|
529
565
|
},
|
|
530
566
|
.type_name = type_name,
|
|
531
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,
|
|
532
571
|
};
|
|
533
572
|
|
|
534
573
|
return instance;
|
|
535
574
|
}
|
|
536
|
-
#line
|
|
537
|
-
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) {
|
|
538
577
|
rbs_ast_directives_use_wildcard_clause_t *instance = rbs_allocator_alloc(allocator, rbs_ast_directives_use_wildcard_clause_t);
|
|
539
578
|
|
|
540
579
|
*instance = (rbs_ast_directives_use_wildcard_clause_t) {
|
|
@@ -543,12 +582,14 @@ rbs_ast_directives_use_wildcard_clause_t *rbs_ast_directives_use_wildcard_clause
|
|
|
543
582
|
.location = location,
|
|
544
583
|
},
|
|
545
584
|
.rbs_namespace = rbs_namespace,
|
|
585
|
+
.namespace_range = namespace_range,
|
|
586
|
+
.star_range = star_range,
|
|
546
587
|
};
|
|
547
588
|
|
|
548
589
|
return instance;
|
|
549
590
|
}
|
|
550
|
-
#line
|
|
551
|
-
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) {
|
|
552
593
|
rbs_ast_integer_t *instance = rbs_allocator_alloc(allocator, rbs_ast_integer_t);
|
|
553
594
|
|
|
554
595
|
*instance = (rbs_ast_integer_t) {
|
|
@@ -561,8 +602,8 @@ rbs_ast_integer_t *rbs_ast_integer_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
561
602
|
|
|
562
603
|
return instance;
|
|
563
604
|
}
|
|
564
|
-
#line
|
|
565
|
-
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) {
|
|
566
607
|
rbs_ast_members_alias_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_alias_t);
|
|
567
608
|
|
|
568
609
|
*instance = (rbs_ast_members_alias_t) {
|
|
@@ -575,12 +616,17 @@ rbs_ast_members_alias_t *rbs_ast_members_alias_new(rbs_allocator_t *allocator, r
|
|
|
575
616
|
.kind = kind,
|
|
576
617
|
.annotations = annotations,
|
|
577
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,
|
|
578
624
|
};
|
|
579
625
|
|
|
580
626
|
return instance;
|
|
581
627
|
}
|
|
582
|
-
#line
|
|
583
|
-
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) {
|
|
584
630
|
rbs_ast_members_attr_accessor_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_attr_accessor_t);
|
|
585
631
|
|
|
586
632
|
*instance = (rbs_ast_members_attr_accessor_t) {
|
|
@@ -595,12 +641,19 @@ rbs_ast_members_attr_accessor_t *rbs_ast_members_attr_accessor_new(rbs_allocator
|
|
|
595
641
|
.annotations = annotations,
|
|
596
642
|
.comment = comment,
|
|
597
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,
|
|
598
651
|
};
|
|
599
652
|
|
|
600
653
|
return instance;
|
|
601
654
|
}
|
|
602
|
-
#line
|
|
603
|
-
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) {
|
|
604
657
|
rbs_ast_members_attr_reader_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_attr_reader_t);
|
|
605
658
|
|
|
606
659
|
*instance = (rbs_ast_members_attr_reader_t) {
|
|
@@ -615,12 +668,19 @@ rbs_ast_members_attr_reader_t *rbs_ast_members_attr_reader_new(rbs_allocator_t *
|
|
|
615
668
|
.annotations = annotations,
|
|
616
669
|
.comment = comment,
|
|
617
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,
|
|
618
678
|
};
|
|
619
679
|
|
|
620
680
|
return instance;
|
|
621
681
|
}
|
|
622
|
-
#line
|
|
623
|
-
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) {
|
|
624
684
|
rbs_ast_members_attr_writer_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_attr_writer_t);
|
|
625
685
|
|
|
626
686
|
*instance = (rbs_ast_members_attr_writer_t) {
|
|
@@ -635,12 +695,19 @@ rbs_ast_members_attr_writer_t *rbs_ast_members_attr_writer_new(rbs_allocator_t *
|
|
|
635
695
|
.annotations = annotations,
|
|
636
696
|
.comment = comment,
|
|
637
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,
|
|
638
705
|
};
|
|
639
706
|
|
|
640
707
|
return instance;
|
|
641
708
|
}
|
|
642
|
-
#line
|
|
643
|
-
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) {
|
|
644
711
|
rbs_ast_members_class_instance_variable_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_class_instance_variable_t);
|
|
645
712
|
|
|
646
713
|
*instance = (rbs_ast_members_class_instance_variable_t) {
|
|
@@ -651,12 +718,15 @@ rbs_ast_members_class_instance_variable_t *rbs_ast_members_class_instance_variab
|
|
|
651
718
|
.name = name,
|
|
652
719
|
.type = type,
|
|
653
720
|
.comment = comment,
|
|
721
|
+
.name_range = name_range,
|
|
722
|
+
.colon_range = colon_range,
|
|
723
|
+
.kind_range = RBS_LOCATION_NULL_RANGE,
|
|
654
724
|
};
|
|
655
725
|
|
|
656
726
|
return instance;
|
|
657
727
|
}
|
|
658
|
-
#line
|
|
659
|
-
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) {
|
|
660
730
|
rbs_ast_members_class_variable_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_class_variable_t);
|
|
661
731
|
|
|
662
732
|
*instance = (rbs_ast_members_class_variable_t) {
|
|
@@ -667,12 +737,15 @@ rbs_ast_members_class_variable_t *rbs_ast_members_class_variable_new(rbs_allocat
|
|
|
667
737
|
.name = name,
|
|
668
738
|
.type = type,
|
|
669
739
|
.comment = comment,
|
|
740
|
+
.name_range = name_range,
|
|
741
|
+
.colon_range = colon_range,
|
|
742
|
+
.kind_range = RBS_LOCATION_NULL_RANGE,
|
|
670
743
|
};
|
|
671
744
|
|
|
672
745
|
return instance;
|
|
673
746
|
}
|
|
674
|
-
#line
|
|
675
|
-
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) {
|
|
676
749
|
rbs_ast_members_extend_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_extend_t);
|
|
677
750
|
|
|
678
751
|
*instance = (rbs_ast_members_extend_t) {
|
|
@@ -684,12 +757,15 @@ rbs_ast_members_extend_t *rbs_ast_members_extend_new(rbs_allocator_t *allocator,
|
|
|
684
757
|
.args = args,
|
|
685
758
|
.annotations = annotations,
|
|
686
759
|
.comment = comment,
|
|
760
|
+
.name_range = name_range,
|
|
761
|
+
.keyword_range = keyword_range,
|
|
762
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
687
763
|
};
|
|
688
764
|
|
|
689
765
|
return instance;
|
|
690
766
|
}
|
|
691
|
-
#line
|
|
692
|
-
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) {
|
|
693
769
|
rbs_ast_members_include_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_include_t);
|
|
694
770
|
|
|
695
771
|
*instance = (rbs_ast_members_include_t) {
|
|
@@ -701,12 +777,15 @@ rbs_ast_members_include_t *rbs_ast_members_include_new(rbs_allocator_t *allocato
|
|
|
701
777
|
.args = args,
|
|
702
778
|
.annotations = annotations,
|
|
703
779
|
.comment = comment,
|
|
780
|
+
.name_range = name_range,
|
|
781
|
+
.keyword_range = keyword_range,
|
|
782
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
704
783
|
};
|
|
705
784
|
|
|
706
785
|
return instance;
|
|
707
786
|
}
|
|
708
|
-
#line
|
|
709
|
-
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) {
|
|
710
789
|
rbs_ast_members_instance_variable_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_instance_variable_t);
|
|
711
790
|
|
|
712
791
|
*instance = (rbs_ast_members_instance_variable_t) {
|
|
@@ -717,12 +796,15 @@ rbs_ast_members_instance_variable_t *rbs_ast_members_instance_variable_new(rbs_a
|
|
|
717
796
|
.name = name,
|
|
718
797
|
.type = type,
|
|
719
798
|
.comment = comment,
|
|
799
|
+
.name_range = name_range,
|
|
800
|
+
.colon_range = colon_range,
|
|
801
|
+
.kind_range = RBS_LOCATION_NULL_RANGE,
|
|
720
802
|
};
|
|
721
803
|
|
|
722
804
|
return instance;
|
|
723
805
|
}
|
|
724
|
-
#line
|
|
725
|
-
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) {
|
|
726
808
|
rbs_ast_members_method_definition_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_method_definition_t);
|
|
727
809
|
|
|
728
810
|
*instance = (rbs_ast_members_method_definition_t) {
|
|
@@ -737,12 +819,17 @@ rbs_ast_members_method_definition_t *rbs_ast_members_method_definition_new(rbs_a
|
|
|
737
819
|
.comment = comment,
|
|
738
820
|
.overloading = overloading,
|
|
739
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,
|
|
740
827
|
};
|
|
741
828
|
|
|
742
829
|
return instance;
|
|
743
830
|
}
|
|
744
|
-
#line
|
|
745
|
-
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) {
|
|
746
833
|
rbs_ast_members_method_definition_overload_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_method_definition_overload_t);
|
|
747
834
|
|
|
748
835
|
*instance = (rbs_ast_members_method_definition_overload_t) {
|
|
@@ -756,8 +843,8 @@ rbs_ast_members_method_definition_overload_t *rbs_ast_members_method_definition_
|
|
|
756
843
|
|
|
757
844
|
return instance;
|
|
758
845
|
}
|
|
759
|
-
#line
|
|
760
|
-
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) {
|
|
761
848
|
rbs_ast_members_prepend_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_prepend_t);
|
|
762
849
|
|
|
763
850
|
*instance = (rbs_ast_members_prepend_t) {
|
|
@@ -769,12 +856,15 @@ rbs_ast_members_prepend_t *rbs_ast_members_prepend_new(rbs_allocator_t *allocato
|
|
|
769
856
|
.args = args,
|
|
770
857
|
.annotations = annotations,
|
|
771
858
|
.comment = comment,
|
|
859
|
+
.name_range = name_range,
|
|
860
|
+
.keyword_range = keyword_range,
|
|
861
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
772
862
|
};
|
|
773
863
|
|
|
774
864
|
return instance;
|
|
775
865
|
}
|
|
776
|
-
#line
|
|
777
|
-
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) {
|
|
778
868
|
rbs_ast_members_private_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_private_t);
|
|
779
869
|
|
|
780
870
|
*instance = (rbs_ast_members_private_t) {
|
|
@@ -786,8 +876,8 @@ rbs_ast_members_private_t *rbs_ast_members_private_new(rbs_allocator_t *allocato
|
|
|
786
876
|
|
|
787
877
|
return instance;
|
|
788
878
|
}
|
|
789
|
-
#line
|
|
790
|
-
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) {
|
|
791
881
|
rbs_ast_members_public_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_public_t);
|
|
792
882
|
|
|
793
883
|
*instance = (rbs_ast_members_public_t) {
|
|
@@ -799,8 +889,46 @@ rbs_ast_members_public_t *rbs_ast_members_public_new(rbs_allocator_t *allocator,
|
|
|
799
889
|
|
|
800
890
|
return instance;
|
|
801
891
|
}
|
|
802
|
-
#line
|
|
803
|
-
|
|
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) {
|
|
804
932
|
rbs_ast_ruby_annotations_colon_method_type_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_colon_method_type_annotation_t);
|
|
805
933
|
|
|
806
934
|
*instance = (rbs_ast_ruby_annotations_colon_method_type_annotation_t) {
|
|
@@ -815,8 +943,46 @@ rbs_ast_ruby_annotations_colon_method_type_annotation_t *rbs_ast_ruby_annotation
|
|
|
815
943
|
|
|
816
944
|
return instance;
|
|
817
945
|
}
|
|
818
|
-
#line
|
|
819
|
-
|
|
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) {
|
|
820
986
|
rbs_ast_ruby_annotations_method_types_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_method_types_annotation_t);
|
|
821
987
|
|
|
822
988
|
*instance = (rbs_ast_ruby_annotations_method_types_annotation_t) {
|
|
@@ -827,12 +993,30 @@ rbs_ast_ruby_annotations_method_types_annotation_t *rbs_ast_ruby_annotations_met
|
|
|
827
993
|
.prefix_location = prefix_location,
|
|
828
994
|
.overloads = overloads,
|
|
829
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,
|
|
830
1014
|
};
|
|
831
1015
|
|
|
832
1016
|
return instance;
|
|
833
1017
|
}
|
|
834
|
-
#line
|
|
835
|
-
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) {
|
|
836
1020
|
rbs_ast_ruby_annotations_node_type_assertion_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_node_type_assertion_t);
|
|
837
1021
|
|
|
838
1022
|
*instance = (rbs_ast_ruby_annotations_node_type_assertion_t) {
|
|
@@ -846,8 +1030,26 @@ rbs_ast_ruby_annotations_node_type_assertion_t *rbs_ast_ruby_annotations_node_ty
|
|
|
846
1030
|
|
|
847
1031
|
return instance;
|
|
848
1032
|
}
|
|
849
|
-
#line
|
|
850
|
-
|
|
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) {
|
|
851
1053
|
rbs_ast_ruby_annotations_return_type_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_return_type_annotation_t);
|
|
852
1054
|
|
|
853
1055
|
*instance = (rbs_ast_ruby_annotations_return_type_annotation_t) {
|
|
@@ -864,8 +1066,8 @@ rbs_ast_ruby_annotations_return_type_annotation_t *rbs_ast_ruby_annotations_retu
|
|
|
864
1066
|
|
|
865
1067
|
return instance;
|
|
866
1068
|
}
|
|
867
|
-
#line
|
|
868
|
-
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) {
|
|
869
1071
|
rbs_ast_ruby_annotations_skip_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_skip_annotation_t);
|
|
870
1072
|
|
|
871
1073
|
*instance = (rbs_ast_ruby_annotations_skip_annotation_t) {
|
|
@@ -880,8 +1082,44 @@ rbs_ast_ruby_annotations_skip_annotation_t *rbs_ast_ruby_annotations_skip_annota
|
|
|
880
1082
|
|
|
881
1083
|
return instance;
|
|
882
1084
|
}
|
|
883
|
-
#line
|
|
884
|
-
|
|
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) {
|
|
885
1123
|
rbs_ast_string_t *instance = rbs_allocator_alloc(allocator, rbs_ast_string_t);
|
|
886
1124
|
|
|
887
1125
|
*instance = (rbs_ast_string_t) {
|
|
@@ -894,8 +1132,8 @@ rbs_ast_string_t *rbs_ast_string_new(rbs_allocator_t *allocator, rbs_location_t
|
|
|
894
1132
|
|
|
895
1133
|
return instance;
|
|
896
1134
|
}
|
|
897
|
-
#line
|
|
898
|
-
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) {
|
|
899
1137
|
rbs_ast_type_param_t *instance = rbs_allocator_alloc(allocator, rbs_ast_type_param_t);
|
|
900
1138
|
|
|
901
1139
|
*instance = (rbs_ast_type_param_t) {
|
|
@@ -906,14 +1144,21 @@ rbs_ast_type_param_t *rbs_ast_type_param_new(rbs_allocator_t *allocator, rbs_loc
|
|
|
906
1144
|
.name = name,
|
|
907
1145
|
.variance = variance,
|
|
908
1146
|
.upper_bound = upper_bound,
|
|
1147
|
+
.lower_bound = lower_bound,
|
|
909
1148
|
.default_type = default_type,
|
|
910
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,
|
|
911
1156
|
};
|
|
912
1157
|
|
|
913
1158
|
return instance;
|
|
914
1159
|
}
|
|
915
|
-
#line
|
|
916
|
-
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) {
|
|
917
1162
|
rbs_method_type_t *instance = rbs_allocator_alloc(allocator, rbs_method_type_t);
|
|
918
1163
|
|
|
919
1164
|
*instance = (rbs_method_type_t) {
|
|
@@ -924,12 +1169,14 @@ rbs_method_type_t *rbs_method_type_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
924
1169
|
.type_params = type_params,
|
|
925
1170
|
.type = type,
|
|
926
1171
|
.block = block,
|
|
1172
|
+
.type_range = type_range,
|
|
1173
|
+
.type_params_range = RBS_LOCATION_NULL_RANGE,
|
|
927
1174
|
};
|
|
928
1175
|
|
|
929
1176
|
return instance;
|
|
930
1177
|
}
|
|
931
|
-
#line
|
|
932
|
-
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) {
|
|
933
1180
|
rbs_namespace_t *instance = rbs_allocator_alloc(allocator, rbs_namespace_t);
|
|
934
1181
|
|
|
935
1182
|
*instance = (rbs_namespace_t) {
|
|
@@ -943,8 +1190,8 @@ rbs_namespace_t *rbs_namespace_new(rbs_allocator_t *allocator, rbs_location_t *l
|
|
|
943
1190
|
|
|
944
1191
|
return instance;
|
|
945
1192
|
}
|
|
946
|
-
#line
|
|
947
|
-
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) {
|
|
948
1195
|
rbs_signature_t *instance = rbs_allocator_alloc(allocator, rbs_signature_t);
|
|
949
1196
|
|
|
950
1197
|
*instance = (rbs_signature_t) {
|
|
@@ -958,8 +1205,8 @@ rbs_signature_t *rbs_signature_new(rbs_allocator_t *allocator, rbs_location_t *l
|
|
|
958
1205
|
|
|
959
1206
|
return instance;
|
|
960
1207
|
}
|
|
961
|
-
#line
|
|
962
|
-
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) {
|
|
963
1210
|
rbs_type_name_t *instance = rbs_allocator_alloc(allocator, rbs_type_name_t);
|
|
964
1211
|
|
|
965
1212
|
*instance = (rbs_type_name_t) {
|
|
@@ -973,8 +1220,8 @@ rbs_type_name_t *rbs_type_name_new(rbs_allocator_t *allocator, rbs_location_t *l
|
|
|
973
1220
|
|
|
974
1221
|
return instance;
|
|
975
1222
|
}
|
|
976
|
-
#line
|
|
977
|
-
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) {
|
|
978
1225
|
rbs_types_alias_t *instance = rbs_allocator_alloc(allocator, rbs_types_alias_t);
|
|
979
1226
|
|
|
980
1227
|
*instance = (rbs_types_alias_t) {
|
|
@@ -984,12 +1231,14 @@ rbs_types_alias_t *rbs_types_alias_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
984
1231
|
},
|
|
985
1232
|
.name = name,
|
|
986
1233
|
.args = args,
|
|
1234
|
+
.name_range = name_range,
|
|
1235
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
987
1236
|
};
|
|
988
1237
|
|
|
989
1238
|
return instance;
|
|
990
1239
|
}
|
|
991
|
-
#line
|
|
992
|
-
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) {
|
|
993
1242
|
rbs_types_bases_any_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_any_t);
|
|
994
1243
|
|
|
995
1244
|
*instance = (rbs_types_bases_any_t) {
|
|
@@ -1002,8 +1251,8 @@ rbs_types_bases_any_t *rbs_types_bases_any_new(rbs_allocator_t *allocator, rbs_l
|
|
|
1002
1251
|
|
|
1003
1252
|
return instance;
|
|
1004
1253
|
}
|
|
1005
|
-
#line
|
|
1006
|
-
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) {
|
|
1007
1256
|
rbs_types_bases_bool_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_bool_t);
|
|
1008
1257
|
|
|
1009
1258
|
*instance = (rbs_types_bases_bool_t) {
|
|
@@ -1015,8 +1264,8 @@ rbs_types_bases_bool_t *rbs_types_bases_bool_new(rbs_allocator_t *allocator, rbs
|
|
|
1015
1264
|
|
|
1016
1265
|
return instance;
|
|
1017
1266
|
}
|
|
1018
|
-
#line
|
|
1019
|
-
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) {
|
|
1020
1269
|
rbs_types_bases_bottom_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_bottom_t);
|
|
1021
1270
|
|
|
1022
1271
|
*instance = (rbs_types_bases_bottom_t) {
|
|
@@ -1028,8 +1277,8 @@ rbs_types_bases_bottom_t *rbs_types_bases_bottom_new(rbs_allocator_t *allocator,
|
|
|
1028
1277
|
|
|
1029
1278
|
return instance;
|
|
1030
1279
|
}
|
|
1031
|
-
#line
|
|
1032
|
-
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) {
|
|
1033
1282
|
rbs_types_bases_class_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_class_t);
|
|
1034
1283
|
|
|
1035
1284
|
*instance = (rbs_types_bases_class_t) {
|
|
@@ -1041,8 +1290,8 @@ rbs_types_bases_class_t *rbs_types_bases_class_new(rbs_allocator_t *allocator, r
|
|
|
1041
1290
|
|
|
1042
1291
|
return instance;
|
|
1043
1292
|
}
|
|
1044
|
-
#line
|
|
1045
|
-
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) {
|
|
1046
1295
|
rbs_types_bases_instance_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_instance_t);
|
|
1047
1296
|
|
|
1048
1297
|
*instance = (rbs_types_bases_instance_t) {
|
|
@@ -1054,8 +1303,8 @@ rbs_types_bases_instance_t *rbs_types_bases_instance_new(rbs_allocator_t *alloca
|
|
|
1054
1303
|
|
|
1055
1304
|
return instance;
|
|
1056
1305
|
}
|
|
1057
|
-
#line
|
|
1058
|
-
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) {
|
|
1059
1308
|
rbs_types_bases_nil_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_nil_t);
|
|
1060
1309
|
|
|
1061
1310
|
*instance = (rbs_types_bases_nil_t) {
|
|
@@ -1067,8 +1316,8 @@ rbs_types_bases_nil_t *rbs_types_bases_nil_new(rbs_allocator_t *allocator, rbs_l
|
|
|
1067
1316
|
|
|
1068
1317
|
return instance;
|
|
1069
1318
|
}
|
|
1070
|
-
#line
|
|
1071
|
-
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) {
|
|
1072
1321
|
rbs_types_bases_self_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_self_t);
|
|
1073
1322
|
|
|
1074
1323
|
*instance = (rbs_types_bases_self_t) {
|
|
@@ -1080,8 +1329,8 @@ rbs_types_bases_self_t *rbs_types_bases_self_new(rbs_allocator_t *allocator, rbs
|
|
|
1080
1329
|
|
|
1081
1330
|
return instance;
|
|
1082
1331
|
}
|
|
1083
|
-
#line
|
|
1084
|
-
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) {
|
|
1085
1334
|
rbs_types_bases_top_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_top_t);
|
|
1086
1335
|
|
|
1087
1336
|
*instance = (rbs_types_bases_top_t) {
|
|
@@ -1093,8 +1342,8 @@ rbs_types_bases_top_t *rbs_types_bases_top_new(rbs_allocator_t *allocator, rbs_l
|
|
|
1093
1342
|
|
|
1094
1343
|
return instance;
|
|
1095
1344
|
}
|
|
1096
|
-
#line
|
|
1097
|
-
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) {
|
|
1098
1347
|
rbs_types_bases_void_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_void_t);
|
|
1099
1348
|
|
|
1100
1349
|
*instance = (rbs_types_bases_void_t) {
|
|
@@ -1106,8 +1355,8 @@ rbs_types_bases_void_t *rbs_types_bases_void_new(rbs_allocator_t *allocator, rbs
|
|
|
1106
1355
|
|
|
1107
1356
|
return instance;
|
|
1108
1357
|
}
|
|
1109
|
-
#line
|
|
1110
|
-
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) {
|
|
1111
1360
|
rbs_types_block_t *instance = rbs_allocator_alloc(allocator, rbs_types_block_t);
|
|
1112
1361
|
|
|
1113
1362
|
*instance = (rbs_types_block_t) {
|
|
@@ -1122,8 +1371,8 @@ rbs_types_block_t *rbs_types_block_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
1122
1371
|
|
|
1123
1372
|
return instance;
|
|
1124
1373
|
}
|
|
1125
|
-
#line
|
|
1126
|
-
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) {
|
|
1127
1376
|
rbs_types_class_instance_t *instance = rbs_allocator_alloc(allocator, rbs_types_class_instance_t);
|
|
1128
1377
|
|
|
1129
1378
|
*instance = (rbs_types_class_instance_t) {
|
|
@@ -1133,12 +1382,14 @@ rbs_types_class_instance_t *rbs_types_class_instance_new(rbs_allocator_t *alloca
|
|
|
1133
1382
|
},
|
|
1134
1383
|
.name = name,
|
|
1135
1384
|
.args = args,
|
|
1385
|
+
.name_range = name_range,
|
|
1386
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
1136
1387
|
};
|
|
1137
1388
|
|
|
1138
1389
|
return instance;
|
|
1139
1390
|
}
|
|
1140
|
-
#line
|
|
1141
|
-
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) {
|
|
1142
1393
|
rbs_types_class_singleton_t *instance = rbs_allocator_alloc(allocator, rbs_types_class_singleton_t);
|
|
1143
1394
|
|
|
1144
1395
|
*instance = (rbs_types_class_singleton_t) {
|
|
@@ -1147,12 +1398,15 @@ rbs_types_class_singleton_t *rbs_types_class_singleton_new(rbs_allocator_t *allo
|
|
|
1147
1398
|
.location = location,
|
|
1148
1399
|
},
|
|
1149
1400
|
.name = name,
|
|
1401
|
+
.args = args,
|
|
1402
|
+
.name_range = name_range,
|
|
1403
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
1150
1404
|
};
|
|
1151
1405
|
|
|
1152
1406
|
return instance;
|
|
1153
1407
|
}
|
|
1154
|
-
#line
|
|
1155
|
-
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) {
|
|
1156
1410
|
rbs_types_function_t *instance = rbs_allocator_alloc(allocator, rbs_types_function_t);
|
|
1157
1411
|
|
|
1158
1412
|
*instance = (rbs_types_function_t) {
|
|
@@ -1172,8 +1426,8 @@ rbs_types_function_t *rbs_types_function_new(rbs_allocator_t *allocator, rbs_loc
|
|
|
1172
1426
|
|
|
1173
1427
|
return instance;
|
|
1174
1428
|
}
|
|
1175
|
-
#line
|
|
1176
|
-
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) {
|
|
1177
1431
|
rbs_types_function_param_t *instance = rbs_allocator_alloc(allocator, rbs_types_function_param_t);
|
|
1178
1432
|
|
|
1179
1433
|
*instance = (rbs_types_function_param_t) {
|
|
@@ -1183,12 +1437,13 @@ rbs_types_function_param_t *rbs_types_function_param_new(rbs_allocator_t *alloca
|
|
|
1183
1437
|
},
|
|
1184
1438
|
.type = type,
|
|
1185
1439
|
.name = name,
|
|
1440
|
+
.name_range = RBS_LOCATION_NULL_RANGE,
|
|
1186
1441
|
};
|
|
1187
1442
|
|
|
1188
1443
|
return instance;
|
|
1189
1444
|
}
|
|
1190
|
-
#line
|
|
1191
|
-
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) {
|
|
1192
1447
|
rbs_types_interface_t *instance = rbs_allocator_alloc(allocator, rbs_types_interface_t);
|
|
1193
1448
|
|
|
1194
1449
|
*instance = (rbs_types_interface_t) {
|
|
@@ -1198,12 +1453,14 @@ rbs_types_interface_t *rbs_types_interface_new(rbs_allocator_t *allocator, rbs_l
|
|
|
1198
1453
|
},
|
|
1199
1454
|
.name = name,
|
|
1200
1455
|
.args = args,
|
|
1456
|
+
.name_range = name_range,
|
|
1457
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
1201
1458
|
};
|
|
1202
1459
|
|
|
1203
1460
|
return instance;
|
|
1204
1461
|
}
|
|
1205
|
-
#line
|
|
1206
|
-
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) {
|
|
1207
1464
|
rbs_types_intersection_t *instance = rbs_allocator_alloc(allocator, rbs_types_intersection_t);
|
|
1208
1465
|
|
|
1209
1466
|
*instance = (rbs_types_intersection_t) {
|
|
@@ -1216,8 +1473,8 @@ rbs_types_intersection_t *rbs_types_intersection_new(rbs_allocator_t *allocator,
|
|
|
1216
1473
|
|
|
1217
1474
|
return instance;
|
|
1218
1475
|
}
|
|
1219
|
-
#line
|
|
1220
|
-
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) {
|
|
1221
1478
|
rbs_types_literal_t *instance = rbs_allocator_alloc(allocator, rbs_types_literal_t);
|
|
1222
1479
|
|
|
1223
1480
|
*instance = (rbs_types_literal_t) {
|
|
@@ -1230,8 +1487,8 @@ rbs_types_literal_t *rbs_types_literal_new(rbs_allocator_t *allocator, rbs_locat
|
|
|
1230
1487
|
|
|
1231
1488
|
return instance;
|
|
1232
1489
|
}
|
|
1233
|
-
#line
|
|
1234
|
-
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) {
|
|
1235
1492
|
rbs_types_optional_t *instance = rbs_allocator_alloc(allocator, rbs_types_optional_t);
|
|
1236
1493
|
|
|
1237
1494
|
*instance = (rbs_types_optional_t) {
|
|
@@ -1244,8 +1501,8 @@ rbs_types_optional_t *rbs_types_optional_new(rbs_allocator_t *allocator, rbs_loc
|
|
|
1244
1501
|
|
|
1245
1502
|
return instance;
|
|
1246
1503
|
}
|
|
1247
|
-
#line
|
|
1248
|
-
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) {
|
|
1249
1506
|
rbs_types_proc_t *instance = rbs_allocator_alloc(allocator, rbs_types_proc_t);
|
|
1250
1507
|
|
|
1251
1508
|
*instance = (rbs_types_proc_t) {
|
|
@@ -1260,8 +1517,8 @@ rbs_types_proc_t *rbs_types_proc_new(rbs_allocator_t *allocator, rbs_location_t
|
|
|
1260
1517
|
|
|
1261
1518
|
return instance;
|
|
1262
1519
|
}
|
|
1263
|
-
#line
|
|
1264
|
-
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) {
|
|
1265
1522
|
rbs_types_record_t *instance = rbs_allocator_alloc(allocator, rbs_types_record_t);
|
|
1266
1523
|
|
|
1267
1524
|
*instance = (rbs_types_record_t) {
|
|
@@ -1274,8 +1531,8 @@ rbs_types_record_t *rbs_types_record_new(rbs_allocator_t *allocator, rbs_locatio
|
|
|
1274
1531
|
|
|
1275
1532
|
return instance;
|
|
1276
1533
|
}
|
|
1277
|
-
#line
|
|
1278
|
-
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) {
|
|
1279
1536
|
rbs_types_record_field_type_t *instance = rbs_allocator_alloc(allocator, rbs_types_record_field_type_t);
|
|
1280
1537
|
|
|
1281
1538
|
*instance = (rbs_types_record_field_type_t) {
|
|
@@ -1289,8 +1546,8 @@ rbs_types_record_field_type_t *rbs_types_record_field_type_new(rbs_allocator_t *
|
|
|
1289
1546
|
|
|
1290
1547
|
return instance;
|
|
1291
1548
|
}
|
|
1292
|
-
#line
|
|
1293
|
-
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) {
|
|
1294
1551
|
rbs_types_tuple_t *instance = rbs_allocator_alloc(allocator, rbs_types_tuple_t);
|
|
1295
1552
|
|
|
1296
1553
|
*instance = (rbs_types_tuple_t) {
|
|
@@ -1303,8 +1560,8 @@ rbs_types_tuple_t *rbs_types_tuple_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
1303
1560
|
|
|
1304
1561
|
return instance;
|
|
1305
1562
|
}
|
|
1306
|
-
#line
|
|
1307
|
-
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) {
|
|
1308
1565
|
rbs_types_union_t *instance = rbs_allocator_alloc(allocator, rbs_types_union_t);
|
|
1309
1566
|
|
|
1310
1567
|
*instance = (rbs_types_union_t) {
|
|
@@ -1317,8 +1574,8 @@ rbs_types_union_t *rbs_types_union_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
1317
1574
|
|
|
1318
1575
|
return instance;
|
|
1319
1576
|
}
|
|
1320
|
-
#line
|
|
1321
|
-
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) {
|
|
1322
1579
|
rbs_types_untyped_function_t *instance = rbs_allocator_alloc(allocator, rbs_types_untyped_function_t);
|
|
1323
1580
|
|
|
1324
1581
|
*instance = (rbs_types_untyped_function_t) {
|
|
@@ -1331,8 +1588,8 @@ rbs_types_untyped_function_t *rbs_types_untyped_function_new(rbs_allocator_t *al
|
|
|
1331
1588
|
|
|
1332
1589
|
return instance;
|
|
1333
1590
|
}
|
|
1334
|
-
#line
|
|
1335
|
-
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) {
|
|
1336
1593
|
rbs_types_variable_t *instance = rbs_allocator_alloc(allocator, rbs_types_variable_t);
|
|
1337
1594
|
|
|
1338
1595
|
*instance = (rbs_types_variable_t) {
|