rbs 4.0.0.dev.4 → 4.1.0.pre.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.clang-format +1 -0
- data/.github/dependabot.yml +16 -14
- data/.github/workflows/bundle-update.yml +63 -0
- data/.github/workflows/c-check.yml +21 -11
- data/.github/workflows/comments.yml +5 -3
- data/.github/workflows/dependabot.yml +2 -2
- data/.github/workflows/jruby.yml +67 -0
- data/.github/workflows/milestone.yml +83 -0
- data/.github/workflows/ruby.yml +63 -24
- data/.github/workflows/rust.yml +184 -0
- data/.github/workflows/truffleruby.yml +54 -0
- data/.github/workflows/typecheck.yml +5 -2
- data/.github/workflows/wasm.yml +53 -0
- data/.github/workflows/windows.yml +8 -2
- data/.gitignore +11 -0
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +357 -0
- data/README.md +4 -4
- data/Rakefile +365 -33
- data/Steepfile +8 -0
- data/config.yml +450 -24
- data/core/array.rbs +443 -363
- data/core/basic_object.rbs +9 -8
- data/core/binding.rbs +0 -2
- data/core/builtin.rbs +9 -8
- data/core/class.rbs +11 -8
- 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 +288 -196
- data/core/enumerator/arithmetic_sequence.rbs +70 -0
- data/core/enumerator/product.rbs +5 -5
- data/core/enumerator.rbs +91 -28
- 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 +260 -1151
- data/core/file_constants.rbs +463 -0
- data/core/file_stat.rbs +534 -0
- data/core/file_test.rbs +3 -3
- data/core/float.rbs +257 -92
- data/core/gc.rbs +425 -281
- data/core/hash.rbs +1151 -829
- data/core/integer.rbs +156 -195
- data/core/io/buffer.rbs +53 -42
- data/core/io/wait.rbs +13 -35
- data/core/io.rbs +216 -150
- data/core/kernel.rbs +239 -163
- 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 +302 -150
- data/core/nil_class.rbs +7 -6
- data/core/numeric.rbs +77 -63
- data/core/object.rbs +9 -11
- data/core/object_space/weak_key_map.rbs +7 -7
- 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 +181 -79
- data/core/rational.rbs +60 -89
- data/core/rbs/ops.rbs +154 -0
- data/core/rbs/unnamed/argf.rbs +63 -56
- 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 +78 -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 +493 -363
- data/core/signal.rbs +26 -16
- data/core/string.rbs +3234 -1285
- data/core/struct.rbs +43 -42
- data/core/symbol.rbs +41 -34
- data/core/thread.rbs +141 -73
- 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/CONTRIBUTING.md +2 -1
- 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 +634 -0
- data/docs/rbs_by_example.md +20 -20
- data/docs/rust.md +96 -0
- data/docs/sigs.md +3 -3
- data/docs/syntax.md +48 -18
- data/docs/type_fingerprint.md +21 -0
- data/docs/wasm_serialization.md +80 -0
- data/exe/rbs +1 -1
- data/ext/rbs_extension/ast_translation.c +1441 -671
- data/ext/rbs_extension/ast_translation.h +7 -0
- data/ext/rbs_extension/class_constants.c +18 -2
- data/ext/rbs_extension/class_constants.h +9 -0
- data/ext/rbs_extension/extconf.rb +6 -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 +183 -39
- data/include/rbs/ast.h +597 -297
- data/include/rbs/defines.h +40 -0
- data/include/rbs/lexer.h +31 -11
- data/include/rbs/location.h +25 -44
- data/include/rbs/parser.h +6 -6
- data/include/rbs/serialize.h +39 -0
- 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/annotate/rdoc_annotator.rb +27 -31
- 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 +335 -3
- data/lib/rbs/ast/ruby/comment_block.rb +30 -4
- data/lib/rbs/ast/ruby/declarations.rb +209 -4
- data/lib/rbs/ast/ruby/helpers/constant_helper.rb +4 -0
- data/lib/rbs/ast/ruby/helpers/location_helper.rb +1 -1
- data/lib/rbs/ast/ruby/members.rb +571 -22
- data/lib/rbs/ast/type_param.rb +24 -4
- data/lib/rbs/buffer.rb +66 -24
- data/lib/rbs/cli/diff.rb +16 -15
- data/lib/rbs/cli/validate.rb +38 -106
- data/lib/rbs/cli.rb +55 -24
- data/lib/rbs/collection/config/lockfile_generator.rb +28 -3
- data/lib/rbs/collection/sources/git.rb +7 -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 +32 -6
- data/lib/rbs/definition_builder.rb +147 -25
- data/lib/rbs/diff.rb +7 -1
- data/lib/rbs/environment.rb +235 -75
- data/lib/rbs/environment_loader.rb +0 -6
- data/lib/rbs/errors.rb +27 -18
- data/lib/rbs/inline_parser.rb +377 -15
- 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/namespace.rb +47 -11
- 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 +10 -0
- data/lib/rbs/resolver/constant_resolver.rb +2 -2
- data/lib/rbs/resolver/type_name_resolver.rb +120 -44
- data/lib/rbs/rewriter.rb +70 -0
- data/lib/rbs/subtractor.rb +3 -1
- data/lib/rbs/test/type_check.rb +25 -3
- data/lib/rbs/type_name.rb +34 -14
- data/lib/rbs/types.rb +88 -78
- data/lib/rbs/unit_test/type_assertions.rb +44 -8
- data/lib/rbs/validator.rb +2 -2
- data/lib/rbs/version.rb +1 -1
- data/lib/rbs/wasm/deserializer.rb +213 -0
- data/lib/rbs/wasm/location.rb +61 -0
- data/lib/rbs/wasm/parser.rb +137 -0
- data/lib/rbs/wasm/runtime.rb +217 -0
- data/lib/rbs/wasm/serialization_schema.rb +110 -0
- data/lib/rbs.rb +13 -2
- data/lib/rdoc/discover.rb +1 -1
- data/lib/rdoc_plugin/parser.rb +1 -1
- data/rbs.gemspec +24 -6
- data/schema/typeParam.json +17 -1
- data/sig/annotate/rdoc_annotater.rbs +12 -9
- data/sig/ast/ruby/annotations.rbs +364 -4
- data/sig/ast/ruby/comment_block.rbs +8 -0
- data/sig/ast/ruby/declarations.rbs +102 -4
- data/sig/ast/ruby/members.rbs +128 -2
- data/sig/buffer.rbs +19 -1
- data/sig/cli/diff.rbs +5 -11
- data/sig/cli/validate.rbs +12 -8
- data/sig/cli.rbs +18 -18
- data/sig/collection/config/lockfile_generator.rbs +2 -0
- 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 +41 -2
- data/sig/locator.rbs +0 -2
- data/sig/manifest.yaml +0 -2
- data/sig/method_builder.rbs +3 -1
- data/sig/namespace.rbs +20 -0
- data/sig/parser.rbs +41 -13
- data/sig/prototype/helpers.rbs +2 -0
- data/sig/resolver/type_name_resolver.rbs +36 -10
- data/sig/rewriter.rbs +45 -0
- data/sig/source.rbs +3 -3
- data/sig/type_param.rbs +13 -8
- data/sig/typename.rbs +15 -0
- data/sig/types.rbs +6 -7
- data/sig/unit_test/spy.rbs +0 -8
- data/sig/unit_test/type_assertions.rbs +15 -0
- data/sig/wasm/deserializer.rbs +66 -0
- data/sig/wasm/serialization_schema.rbs +13 -0
- data/src/ast.c +443 -162
- data/src/lexer.c +1415 -1313
- data/src/lexer.re +4 -0
- data/src/lexstate.c +63 -37
- data/src/location.c +7 -47
- data/src/parser.c +1032 -521
- data/src/serialize.c +958 -0
- data/src/string.c +0 -48
- data/src/util/rbs_allocator.c +89 -74
- 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/abbrev/0/array.rbs +1 -1
- 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/csv/0/csv.rbs +5 -5
- 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 +111 -1
- data/stdlib/erb/0/erb.rbs +748 -347
- data/stdlib/etc/0/etc.rbs +73 -54
- data/stdlib/fileutils/0/fileutils.rbs +179 -160
- data/stdlib/forwardable/0/forwardable.rbs +13 -10
- data/stdlib/io-console/0/io-console.rbs +2 -2
- data/stdlib/json/0/json.rbs +223 -142
- 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 +482 -364
- 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 +26 -69
- 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 +3 -3
- 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 +1209 -95
- data/stdlib/strscan/0/string_scanner.rbs +101 -80
- 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 +4 -1
- data/stdlib/tsort/0/interfaces.rbs +8 -8
- data/stdlib/tsort/0/tsort.rbs +16 -15
- 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 +8 -8
- 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
- data/wasm/README.md +59 -0
- data/wasm/rbs_wasm.c +411 -0
- metadata +56 -8
- data/.vscode/extensions.json +0 -5
- data/.vscode/settings.json +0 -19
data/src/ast.c
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
/* templates/src/ast.c.erb */
|
|
6
6
|
/*----------------------------------------------------------------------------*/
|
|
7
7
|
|
|
8
|
-
#line 2 "
|
|
8
|
+
#line 2 "templates/src/ast.c.erb"
|
|
9
9
|
#include "rbs/ast.h"
|
|
10
10
|
|
|
11
11
|
#include <stdio.h>
|
|
12
12
|
#include <stdlib.h>
|
|
13
13
|
|
|
14
|
-
const char *rbs_node_type_name(rbs_node_t *node) {
|
|
14
|
+
const char *RBS_NONNULL rbs_node_type_name(rbs_node_t *RBS_NONNULL node) {
|
|
15
15
|
switch (node->type) {
|
|
16
16
|
case RBS_AST_ANNOTATION:
|
|
17
17
|
return "RBS::AST::Annotation";
|
|
@@ -75,16 +75,34 @@ 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";
|
|
92
|
+
case RBS_AST_RUBY_ANNOTATIONS_MODULE_SELF_ANNOTATION:
|
|
93
|
+
return "RBS::AST::Ruby::Annotations::ModuleSelfAnnotation";
|
|
82
94
|
case RBS_AST_RUBY_ANNOTATIONS_NODE_TYPE_ASSERTION:
|
|
83
95
|
return "RBS::AST::Ruby::Annotations::NodeTypeAssertion";
|
|
96
|
+
case RBS_AST_RUBY_ANNOTATIONS_PARAM_TYPE_ANNOTATION:
|
|
97
|
+
return "RBS::AST::Ruby::Annotations::ParamTypeAnnotation";
|
|
84
98
|
case RBS_AST_RUBY_ANNOTATIONS_RETURN_TYPE_ANNOTATION:
|
|
85
99
|
return "RBS::AST::Ruby::Annotations::ReturnTypeAnnotation";
|
|
86
100
|
case RBS_AST_RUBY_ANNOTATIONS_SKIP_ANNOTATION:
|
|
87
101
|
return "RBS::AST::Ruby::Annotations::SkipAnnotation";
|
|
102
|
+
case RBS_AST_RUBY_ANNOTATIONS_SPLAT_PARAM_TYPE_ANNOTATION:
|
|
103
|
+
return "RBS::AST::Ruby::Annotations::SplatParamTypeAnnotation";
|
|
104
|
+
case RBS_AST_RUBY_ANNOTATIONS_TYPE_APPLICATION_ANNOTATION:
|
|
105
|
+
return "RBS::AST::Ruby::Annotations::TypeApplicationAnnotation";
|
|
88
106
|
case RBS_AST_STRING:
|
|
89
107
|
return "RBS::AST::String";
|
|
90
108
|
case RBS_AST_TYPE_PARAM:
|
|
@@ -158,7 +176,7 @@ const char *rbs_node_type_name(rbs_node_t *node) {
|
|
|
158
176
|
|
|
159
177
|
/* rbs_node_list */
|
|
160
178
|
|
|
161
|
-
rbs_node_list_t *rbs_node_list_new(rbs_allocator_t *allocator) {
|
|
179
|
+
rbs_node_list_t *RBS_NONNULL rbs_node_list_new(rbs_allocator_t *RBS_NONNULL allocator) {
|
|
162
180
|
rbs_node_list_t *list = rbs_allocator_alloc(allocator, rbs_node_list_t);
|
|
163
181
|
*list = (rbs_node_list_t) {
|
|
164
182
|
.allocator = allocator,
|
|
@@ -170,7 +188,7 @@ rbs_node_list_t *rbs_node_list_new(rbs_allocator_t *allocator) {
|
|
|
170
188
|
return list;
|
|
171
189
|
}
|
|
172
190
|
|
|
173
|
-
void rbs_node_list_append(rbs_node_list_t *list, rbs_node_t *node) {
|
|
191
|
+
void rbs_node_list_append(rbs_node_list_t *RBS_NONNULL list, rbs_node_t *RBS_NONNULL node) {
|
|
174
192
|
rbs_node_list_node_t *new_node = rbs_allocator_alloc(list->allocator, rbs_node_list_node_t);
|
|
175
193
|
*new_node = (rbs_node_list_node_t) {
|
|
176
194
|
.node = node,
|
|
@@ -190,7 +208,7 @@ void rbs_node_list_append(rbs_node_list_t *list, rbs_node_t *node) {
|
|
|
190
208
|
|
|
191
209
|
/* rbs_hash */
|
|
192
210
|
|
|
193
|
-
rbs_hash_t *rbs_hash_new(rbs_allocator_t *allocator) {
|
|
211
|
+
rbs_hash_t *RBS_NONNULL rbs_hash_new(rbs_allocator_t *RBS_NONNULL allocator) {
|
|
194
212
|
rbs_hash_t *hash = rbs_allocator_alloc(allocator, rbs_hash_t);
|
|
195
213
|
*hash = (rbs_hash_t) {
|
|
196
214
|
.allocator = allocator,
|
|
@@ -202,15 +220,13 @@ rbs_hash_t *rbs_hash_new(rbs_allocator_t *allocator) {
|
|
|
202
220
|
return hash;
|
|
203
221
|
}
|
|
204
222
|
|
|
205
|
-
bool rbs_node_equal(rbs_node_t *lhs, rbs_node_t *rhs) {
|
|
223
|
+
bool rbs_node_equal(rbs_node_t *RBS_NONNULL lhs, rbs_node_t *RBS_NONNULL rhs) {
|
|
206
224
|
if (lhs == rhs) return true;
|
|
207
225
|
if (lhs->type != rhs->type) return false;
|
|
208
226
|
|
|
209
227
|
switch (lhs->type) {
|
|
210
228
|
case RBS_AST_SYMBOL:
|
|
211
229
|
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
230
|
case RBS_AST_BOOL:
|
|
215
231
|
return ((rbs_ast_bool_t *) lhs)->value == ((rbs_ast_bool_t *) rhs)->value;
|
|
216
232
|
case RBS_AST_INTEGER:
|
|
@@ -223,7 +239,7 @@ bool rbs_node_equal(rbs_node_t *lhs, rbs_node_t *rhs) {
|
|
|
223
239
|
}
|
|
224
240
|
}
|
|
225
241
|
|
|
226
|
-
rbs_hash_node_t *rbs_hash_find(rbs_hash_t *hash, rbs_node_t *key) {
|
|
242
|
+
rbs_hash_node_t *RBS_NULLABLE rbs_hash_find(rbs_hash_t *RBS_NONNULL hash, rbs_node_t *RBS_NONNULL key) {
|
|
227
243
|
rbs_hash_node_t *current = hash->head;
|
|
228
244
|
|
|
229
245
|
while (current != NULL) {
|
|
@@ -236,7 +252,7 @@ rbs_hash_node_t *rbs_hash_find(rbs_hash_t *hash, rbs_node_t *key) {
|
|
|
236
252
|
return NULL;
|
|
237
253
|
}
|
|
238
254
|
|
|
239
|
-
void rbs_hash_set(rbs_hash_t *hash, rbs_node_t *key, rbs_node_t *value) {
|
|
255
|
+
void rbs_hash_set(rbs_hash_t *RBS_NONNULL hash, rbs_node_t *RBS_NONNULL key, rbs_node_t *RBS_NONNULL value) {
|
|
240
256
|
rbs_hash_node_t *existing_node = rbs_hash_find(hash, key);
|
|
241
257
|
if (existing_node != NULL) {
|
|
242
258
|
existing_node->value = value;
|
|
@@ -257,26 +273,12 @@ void rbs_hash_set(rbs_hash_t *hash, rbs_node_t *key, rbs_node_t *value) {
|
|
|
257
273
|
}
|
|
258
274
|
}
|
|
259
275
|
|
|
260
|
-
rbs_node_t *rbs_hash_get(rbs_hash_t *hash, rbs_node_t *key) {
|
|
276
|
+
rbs_node_t *RBS_NULLABLE rbs_hash_get(rbs_hash_t *RBS_NONNULL hash, rbs_node_t *RBS_NONNULL key) {
|
|
261
277
|
rbs_hash_node_t *node = rbs_hash_find(hash, key);
|
|
262
278
|
return node ? node->value : NULL;
|
|
263
279
|
}
|
|
264
280
|
|
|
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) {
|
|
281
|
+
rbs_ast_symbol_t *RBS_NONNULL rbs_ast_symbol_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_constant_pool_t *RBS_NONNULL constant_pool, rbs_constant_id_t constant_id) {
|
|
280
282
|
rbs_ast_symbol_t *instance = rbs_allocator_alloc(allocator, rbs_ast_symbol_t);
|
|
281
283
|
|
|
282
284
|
*instance = (rbs_ast_symbol_t) {
|
|
@@ -290,8 +292,8 @@ rbs_ast_symbol_t *rbs_ast_symbol_new(rbs_allocator_t *allocator, rbs_location_t
|
|
|
290
292
|
return instance;
|
|
291
293
|
}
|
|
292
294
|
|
|
293
|
-
#line
|
|
294
|
-
rbs_ast_annotation_t *rbs_ast_annotation_new(rbs_allocator_t *allocator,
|
|
295
|
+
#line 140 "templates/src/ast.c.erb"
|
|
296
|
+
rbs_ast_annotation_t *RBS_NONNULL rbs_ast_annotation_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_string_t string) {
|
|
295
297
|
rbs_ast_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_annotation_t);
|
|
296
298
|
|
|
297
299
|
*instance = (rbs_ast_annotation_t) {
|
|
@@ -304,8 +306,8 @@ rbs_ast_annotation_t *rbs_ast_annotation_new(rbs_allocator_t *allocator, rbs_loc
|
|
|
304
306
|
|
|
305
307
|
return instance;
|
|
306
308
|
}
|
|
307
|
-
#line
|
|
308
|
-
rbs_ast_bool_t *rbs_ast_bool_new(rbs_allocator_t *allocator,
|
|
309
|
+
#line 140 "templates/src/ast.c.erb"
|
|
310
|
+
rbs_ast_bool_t *RBS_NONNULL rbs_ast_bool_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, bool value) {
|
|
309
311
|
rbs_ast_bool_t *instance = rbs_allocator_alloc(allocator, rbs_ast_bool_t);
|
|
310
312
|
|
|
311
313
|
*instance = (rbs_ast_bool_t) {
|
|
@@ -318,8 +320,8 @@ rbs_ast_bool_t *rbs_ast_bool_new(rbs_allocator_t *allocator, rbs_location_t *loc
|
|
|
318
320
|
|
|
319
321
|
return instance;
|
|
320
322
|
}
|
|
321
|
-
#line
|
|
322
|
-
rbs_ast_comment_t *rbs_ast_comment_new(rbs_allocator_t *allocator,
|
|
323
|
+
#line 140 "templates/src/ast.c.erb"
|
|
324
|
+
rbs_ast_comment_t *RBS_NONNULL rbs_ast_comment_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_string_t string) {
|
|
323
325
|
rbs_ast_comment_t *instance = rbs_allocator_alloc(allocator, rbs_ast_comment_t);
|
|
324
326
|
|
|
325
327
|
*instance = (rbs_ast_comment_t) {
|
|
@@ -332,8 +334,8 @@ rbs_ast_comment_t *rbs_ast_comment_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
332
334
|
|
|
333
335
|
return instance;
|
|
334
336
|
}
|
|
335
|
-
#line
|
|
336
|
-
rbs_ast_declarations_class_t *rbs_ast_declarations_class_new(rbs_allocator_t *allocator,
|
|
337
|
+
#line 140 "templates/src/ast.c.erb"
|
|
338
|
+
rbs_ast_declarations_class_t *RBS_NONNULL rbs_ast_declarations_class_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL type_params, rbs_ast_declarations_class_super_t *RBS_NULLABLE super_class, rbs_node_list_t *RBS_NONNULL members, rbs_node_list_t *RBS_NONNULL annotations, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range end_range) {
|
|
337
339
|
rbs_ast_declarations_class_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_class_t);
|
|
338
340
|
|
|
339
341
|
*instance = (rbs_ast_declarations_class_t) {
|
|
@@ -347,12 +349,17 @@ rbs_ast_declarations_class_t *rbs_ast_declarations_class_new(rbs_allocator_t *al
|
|
|
347
349
|
.members = members,
|
|
348
350
|
.annotations = annotations,
|
|
349
351
|
.comment = comment,
|
|
352
|
+
.keyword_range = keyword_range,
|
|
353
|
+
.name_range = name_range,
|
|
354
|
+
.end_range = end_range,
|
|
355
|
+
.type_params_range = RBS_LOCATION_NULL_RANGE,
|
|
356
|
+
.lt_range = RBS_LOCATION_NULL_RANGE,
|
|
350
357
|
};
|
|
351
358
|
|
|
352
359
|
return instance;
|
|
353
360
|
}
|
|
354
|
-
#line
|
|
355
|
-
rbs_ast_declarations_class_super_t *rbs_ast_declarations_class_super_new(rbs_allocator_t *allocator,
|
|
361
|
+
#line 140 "templates/src/ast.c.erb"
|
|
362
|
+
rbs_ast_declarations_class_super_t *RBS_NONNULL rbs_ast_declarations_class_super_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL args, rbs_location_range name_range) {
|
|
356
363
|
rbs_ast_declarations_class_super_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_class_super_t);
|
|
357
364
|
|
|
358
365
|
*instance = (rbs_ast_declarations_class_super_t) {
|
|
@@ -362,12 +369,14 @@ rbs_ast_declarations_class_super_t *rbs_ast_declarations_class_super_new(rbs_all
|
|
|
362
369
|
},
|
|
363
370
|
.name = name,
|
|
364
371
|
.args = args,
|
|
372
|
+
.name_range = name_range,
|
|
373
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
365
374
|
};
|
|
366
375
|
|
|
367
376
|
return instance;
|
|
368
377
|
}
|
|
369
|
-
#line
|
|
370
|
-
rbs_ast_declarations_class_alias_t *rbs_ast_declarations_class_alias_new(rbs_allocator_t *allocator,
|
|
378
|
+
#line 140 "templates/src/ast.c.erb"
|
|
379
|
+
rbs_ast_declarations_class_alias_t *RBS_NONNULL rbs_ast_declarations_class_alias_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL new_name, rbs_type_name_t *RBS_NONNULL old_name, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_node_list_t *RBS_NONNULL annotations, rbs_location_range keyword_range, rbs_location_range new_name_range, rbs_location_range eq_range, rbs_location_range old_name_range) {
|
|
371
380
|
rbs_ast_declarations_class_alias_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_class_alias_t);
|
|
372
381
|
|
|
373
382
|
*instance = (rbs_ast_declarations_class_alias_t) {
|
|
@@ -379,12 +388,16 @@ rbs_ast_declarations_class_alias_t *rbs_ast_declarations_class_alias_new(rbs_all
|
|
|
379
388
|
.old_name = old_name,
|
|
380
389
|
.comment = comment,
|
|
381
390
|
.annotations = annotations,
|
|
391
|
+
.keyword_range = keyword_range,
|
|
392
|
+
.new_name_range = new_name_range,
|
|
393
|
+
.eq_range = eq_range,
|
|
394
|
+
.old_name_range = old_name_range,
|
|
382
395
|
};
|
|
383
396
|
|
|
384
397
|
return instance;
|
|
385
398
|
}
|
|
386
|
-
#line
|
|
387
|
-
rbs_ast_declarations_constant_t *rbs_ast_declarations_constant_new(rbs_allocator_t *allocator,
|
|
399
|
+
#line 140 "templates/src/ast.c.erb"
|
|
400
|
+
rbs_ast_declarations_constant_t *RBS_NONNULL rbs_ast_declarations_constant_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_t *RBS_NONNULL type, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_node_list_t *RBS_NONNULL annotations, rbs_location_range name_range, rbs_location_range colon_range) {
|
|
388
401
|
rbs_ast_declarations_constant_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_constant_t);
|
|
389
402
|
|
|
390
403
|
*instance = (rbs_ast_declarations_constant_t) {
|
|
@@ -396,12 +409,14 @@ rbs_ast_declarations_constant_t *rbs_ast_declarations_constant_new(rbs_allocator
|
|
|
396
409
|
.type = type,
|
|
397
410
|
.comment = comment,
|
|
398
411
|
.annotations = annotations,
|
|
412
|
+
.name_range = name_range,
|
|
413
|
+
.colon_range = colon_range,
|
|
399
414
|
};
|
|
400
415
|
|
|
401
416
|
return instance;
|
|
402
417
|
}
|
|
403
|
-
#line
|
|
404
|
-
rbs_ast_declarations_global_t *rbs_ast_declarations_global_new(rbs_allocator_t *allocator,
|
|
418
|
+
#line 140 "templates/src/ast.c.erb"
|
|
419
|
+
rbs_ast_declarations_global_t *RBS_NONNULL rbs_ast_declarations_global_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_ast_symbol_t *RBS_NONNULL name, rbs_node_t *RBS_NONNULL type, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_node_list_t *RBS_NONNULL annotations, rbs_location_range name_range, rbs_location_range colon_range) {
|
|
405
420
|
rbs_ast_declarations_global_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_global_t);
|
|
406
421
|
|
|
407
422
|
*instance = (rbs_ast_declarations_global_t) {
|
|
@@ -413,12 +428,14 @@ rbs_ast_declarations_global_t *rbs_ast_declarations_global_new(rbs_allocator_t *
|
|
|
413
428
|
.type = type,
|
|
414
429
|
.comment = comment,
|
|
415
430
|
.annotations = annotations,
|
|
431
|
+
.name_range = name_range,
|
|
432
|
+
.colon_range = colon_range,
|
|
416
433
|
};
|
|
417
434
|
|
|
418
435
|
return instance;
|
|
419
436
|
}
|
|
420
|
-
#line
|
|
421
|
-
rbs_ast_declarations_interface_t *rbs_ast_declarations_interface_new(rbs_allocator_t *allocator,
|
|
437
|
+
#line 140 "templates/src/ast.c.erb"
|
|
438
|
+
rbs_ast_declarations_interface_t *RBS_NONNULL rbs_ast_declarations_interface_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL type_params, rbs_node_list_t *RBS_NONNULL members, rbs_node_list_t *RBS_NONNULL annotations, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range end_range) {
|
|
422
439
|
rbs_ast_declarations_interface_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_interface_t);
|
|
423
440
|
|
|
424
441
|
*instance = (rbs_ast_declarations_interface_t) {
|
|
@@ -431,12 +448,16 @@ rbs_ast_declarations_interface_t *rbs_ast_declarations_interface_new(rbs_allocat
|
|
|
431
448
|
.members = members,
|
|
432
449
|
.annotations = annotations,
|
|
433
450
|
.comment = comment,
|
|
451
|
+
.keyword_range = keyword_range,
|
|
452
|
+
.name_range = name_range,
|
|
453
|
+
.end_range = end_range,
|
|
454
|
+
.type_params_range = RBS_LOCATION_NULL_RANGE,
|
|
434
455
|
};
|
|
435
456
|
|
|
436
457
|
return instance;
|
|
437
458
|
}
|
|
438
|
-
#line
|
|
439
|
-
rbs_ast_declarations_module_t *rbs_ast_declarations_module_new(rbs_allocator_t *allocator,
|
|
459
|
+
#line 140 "templates/src/ast.c.erb"
|
|
460
|
+
rbs_ast_declarations_module_t *RBS_NONNULL rbs_ast_declarations_module_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL type_params, rbs_node_list_t *RBS_NONNULL self_types, rbs_node_list_t *RBS_NONNULL members, rbs_node_list_t *RBS_NONNULL annotations, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range end_range) {
|
|
440
461
|
rbs_ast_declarations_module_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_module_t);
|
|
441
462
|
|
|
442
463
|
*instance = (rbs_ast_declarations_module_t) {
|
|
@@ -450,12 +471,18 @@ rbs_ast_declarations_module_t *rbs_ast_declarations_module_new(rbs_allocator_t *
|
|
|
450
471
|
.members = members,
|
|
451
472
|
.annotations = annotations,
|
|
452
473
|
.comment = comment,
|
|
474
|
+
.keyword_range = keyword_range,
|
|
475
|
+
.name_range = name_range,
|
|
476
|
+
.end_range = end_range,
|
|
477
|
+
.type_params_range = RBS_LOCATION_NULL_RANGE,
|
|
478
|
+
.colon_range = RBS_LOCATION_NULL_RANGE,
|
|
479
|
+
.self_types_range = RBS_LOCATION_NULL_RANGE,
|
|
453
480
|
};
|
|
454
481
|
|
|
455
482
|
return instance;
|
|
456
483
|
}
|
|
457
|
-
#line
|
|
458
|
-
rbs_ast_declarations_module_self_t *rbs_ast_declarations_module_self_new(rbs_allocator_t *allocator,
|
|
484
|
+
#line 140 "templates/src/ast.c.erb"
|
|
485
|
+
rbs_ast_declarations_module_self_t *RBS_NONNULL rbs_ast_declarations_module_self_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL args, rbs_location_range name_range) {
|
|
459
486
|
rbs_ast_declarations_module_self_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_module_self_t);
|
|
460
487
|
|
|
461
488
|
*instance = (rbs_ast_declarations_module_self_t) {
|
|
@@ -465,12 +492,14 @@ rbs_ast_declarations_module_self_t *rbs_ast_declarations_module_self_new(rbs_all
|
|
|
465
492
|
},
|
|
466
493
|
.name = name,
|
|
467
494
|
.args = args,
|
|
495
|
+
.name_range = name_range,
|
|
496
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
468
497
|
};
|
|
469
498
|
|
|
470
499
|
return instance;
|
|
471
500
|
}
|
|
472
|
-
#line
|
|
473
|
-
rbs_ast_declarations_module_alias_t *rbs_ast_declarations_module_alias_new(rbs_allocator_t *allocator,
|
|
501
|
+
#line 140 "templates/src/ast.c.erb"
|
|
502
|
+
rbs_ast_declarations_module_alias_t *RBS_NONNULL rbs_ast_declarations_module_alias_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL new_name, rbs_type_name_t *RBS_NONNULL old_name, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_node_list_t *RBS_NONNULL annotations, rbs_location_range keyword_range, rbs_location_range new_name_range, rbs_location_range eq_range, rbs_location_range old_name_range) {
|
|
474
503
|
rbs_ast_declarations_module_alias_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_module_alias_t);
|
|
475
504
|
|
|
476
505
|
*instance = (rbs_ast_declarations_module_alias_t) {
|
|
@@ -482,12 +511,16 @@ rbs_ast_declarations_module_alias_t *rbs_ast_declarations_module_alias_new(rbs_a
|
|
|
482
511
|
.old_name = old_name,
|
|
483
512
|
.comment = comment,
|
|
484
513
|
.annotations = annotations,
|
|
514
|
+
.keyword_range = keyword_range,
|
|
515
|
+
.new_name_range = new_name_range,
|
|
516
|
+
.eq_range = eq_range,
|
|
517
|
+
.old_name_range = old_name_range,
|
|
485
518
|
};
|
|
486
519
|
|
|
487
520
|
return instance;
|
|
488
521
|
}
|
|
489
|
-
#line
|
|
490
|
-
rbs_ast_declarations_type_alias_t *rbs_ast_declarations_type_alias_new(rbs_allocator_t *allocator,
|
|
522
|
+
#line 140 "templates/src/ast.c.erb"
|
|
523
|
+
rbs_ast_declarations_type_alias_t *RBS_NONNULL rbs_ast_declarations_type_alias_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL type_params, rbs_node_t *RBS_NONNULL type, rbs_node_list_t *RBS_NONNULL annotations, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range eq_range) {
|
|
491
524
|
rbs_ast_declarations_type_alias_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_type_alias_t);
|
|
492
525
|
|
|
493
526
|
*instance = (rbs_ast_declarations_type_alias_t) {
|
|
@@ -500,12 +533,16 @@ rbs_ast_declarations_type_alias_t *rbs_ast_declarations_type_alias_new(rbs_alloc
|
|
|
500
533
|
.type = type,
|
|
501
534
|
.annotations = annotations,
|
|
502
535
|
.comment = comment,
|
|
536
|
+
.keyword_range = keyword_range,
|
|
537
|
+
.name_range = name_range,
|
|
538
|
+
.eq_range = eq_range,
|
|
539
|
+
.type_params_range = RBS_LOCATION_NULL_RANGE,
|
|
503
540
|
};
|
|
504
541
|
|
|
505
542
|
return instance;
|
|
506
543
|
}
|
|
507
|
-
#line
|
|
508
|
-
rbs_ast_directives_use_t *rbs_ast_directives_use_new(rbs_allocator_t *allocator,
|
|
544
|
+
#line 140 "templates/src/ast.c.erb"
|
|
545
|
+
rbs_ast_directives_use_t *RBS_NONNULL rbs_ast_directives_use_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_list_t *RBS_NONNULL clauses, rbs_location_range keyword_range) {
|
|
509
546
|
rbs_ast_directives_use_t *instance = rbs_allocator_alloc(allocator, rbs_ast_directives_use_t);
|
|
510
547
|
|
|
511
548
|
*instance = (rbs_ast_directives_use_t) {
|
|
@@ -514,12 +551,13 @@ rbs_ast_directives_use_t *rbs_ast_directives_use_new(rbs_allocator_t *allocator,
|
|
|
514
551
|
.location = location,
|
|
515
552
|
},
|
|
516
553
|
.clauses = clauses,
|
|
554
|
+
.keyword_range = keyword_range,
|
|
517
555
|
};
|
|
518
556
|
|
|
519
557
|
return instance;
|
|
520
558
|
}
|
|
521
|
-
#line
|
|
522
|
-
rbs_ast_directives_use_single_clause_t *rbs_ast_directives_use_single_clause_new(rbs_allocator_t *allocator,
|
|
559
|
+
#line 140 "templates/src/ast.c.erb"
|
|
560
|
+
rbs_ast_directives_use_single_clause_t *RBS_NONNULL rbs_ast_directives_use_single_clause_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL type_name, rbs_ast_symbol_t *RBS_NULLABLE new_name, rbs_location_range type_name_range) {
|
|
523
561
|
rbs_ast_directives_use_single_clause_t *instance = rbs_allocator_alloc(allocator, rbs_ast_directives_use_single_clause_t);
|
|
524
562
|
|
|
525
563
|
*instance = (rbs_ast_directives_use_single_clause_t) {
|
|
@@ -529,12 +567,15 @@ rbs_ast_directives_use_single_clause_t *rbs_ast_directives_use_single_clause_new
|
|
|
529
567
|
},
|
|
530
568
|
.type_name = type_name,
|
|
531
569
|
.new_name = new_name,
|
|
570
|
+
.type_name_range = type_name_range,
|
|
571
|
+
.keyword_range = RBS_LOCATION_NULL_RANGE,
|
|
572
|
+
.new_name_range = RBS_LOCATION_NULL_RANGE,
|
|
532
573
|
};
|
|
533
574
|
|
|
534
575
|
return instance;
|
|
535
576
|
}
|
|
536
|
-
#line
|
|
537
|
-
rbs_ast_directives_use_wildcard_clause_t *rbs_ast_directives_use_wildcard_clause_new(rbs_allocator_t *allocator,
|
|
577
|
+
#line 140 "templates/src/ast.c.erb"
|
|
578
|
+
rbs_ast_directives_use_wildcard_clause_t *RBS_NONNULL rbs_ast_directives_use_wildcard_clause_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_namespace_t *RBS_NONNULL rbs_namespace, rbs_location_range namespace_range, rbs_location_range star_range) {
|
|
538
579
|
rbs_ast_directives_use_wildcard_clause_t *instance = rbs_allocator_alloc(allocator, rbs_ast_directives_use_wildcard_clause_t);
|
|
539
580
|
|
|
540
581
|
*instance = (rbs_ast_directives_use_wildcard_clause_t) {
|
|
@@ -543,12 +584,14 @@ rbs_ast_directives_use_wildcard_clause_t *rbs_ast_directives_use_wildcard_clause
|
|
|
543
584
|
.location = location,
|
|
544
585
|
},
|
|
545
586
|
.rbs_namespace = rbs_namespace,
|
|
587
|
+
.namespace_range = namespace_range,
|
|
588
|
+
.star_range = star_range,
|
|
546
589
|
};
|
|
547
590
|
|
|
548
591
|
return instance;
|
|
549
592
|
}
|
|
550
|
-
#line
|
|
551
|
-
rbs_ast_integer_t *rbs_ast_integer_new(rbs_allocator_t *allocator,
|
|
593
|
+
#line 140 "templates/src/ast.c.erb"
|
|
594
|
+
rbs_ast_integer_t *RBS_NONNULL rbs_ast_integer_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_string_t string_representation) {
|
|
552
595
|
rbs_ast_integer_t *instance = rbs_allocator_alloc(allocator, rbs_ast_integer_t);
|
|
553
596
|
|
|
554
597
|
*instance = (rbs_ast_integer_t) {
|
|
@@ -561,8 +604,8 @@ rbs_ast_integer_t *rbs_ast_integer_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
561
604
|
|
|
562
605
|
return instance;
|
|
563
606
|
}
|
|
564
|
-
#line
|
|
565
|
-
rbs_ast_members_alias_t *rbs_ast_members_alias_new(rbs_allocator_t *allocator,
|
|
607
|
+
#line 140 "templates/src/ast.c.erb"
|
|
608
|
+
rbs_ast_members_alias_t *RBS_NONNULL rbs_ast_members_alias_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_ast_symbol_t *RBS_NONNULL new_name, rbs_ast_symbol_t *RBS_NONNULL old_name, enum rbs_alias_kind kind, rbs_node_list_t *RBS_NONNULL annotations, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_location_range keyword_range, rbs_location_range new_name_range, rbs_location_range old_name_range) {
|
|
566
609
|
rbs_ast_members_alias_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_alias_t);
|
|
567
610
|
|
|
568
611
|
*instance = (rbs_ast_members_alias_t) {
|
|
@@ -575,12 +618,17 @@ rbs_ast_members_alias_t *rbs_ast_members_alias_new(rbs_allocator_t *allocator, r
|
|
|
575
618
|
.kind = kind,
|
|
576
619
|
.annotations = annotations,
|
|
577
620
|
.comment = comment,
|
|
621
|
+
.keyword_range = keyword_range,
|
|
622
|
+
.new_name_range = new_name_range,
|
|
623
|
+
.old_name_range = old_name_range,
|
|
624
|
+
.new_kind_range = RBS_LOCATION_NULL_RANGE,
|
|
625
|
+
.old_kind_range = RBS_LOCATION_NULL_RANGE,
|
|
578
626
|
};
|
|
579
627
|
|
|
580
628
|
return instance;
|
|
581
629
|
}
|
|
582
|
-
#line
|
|
583
|
-
rbs_ast_members_attr_accessor_t *rbs_ast_members_attr_accessor_new(rbs_allocator_t *allocator,
|
|
630
|
+
#line 140 "templates/src/ast.c.erb"
|
|
631
|
+
rbs_ast_members_attr_accessor_t *RBS_NONNULL rbs_ast_members_attr_accessor_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_ast_symbol_t *RBS_NONNULL name, rbs_node_t *RBS_NONNULL type, rbs_attr_ivar_name_t ivar_name, enum rbs_attribute_kind kind, rbs_node_list_t *RBS_NONNULL annotations, rbs_ast_comment_t *RBS_NULLABLE comment, enum rbs_attribute_visibility visibility, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range colon_range) {
|
|
584
632
|
rbs_ast_members_attr_accessor_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_attr_accessor_t);
|
|
585
633
|
|
|
586
634
|
*instance = (rbs_ast_members_attr_accessor_t) {
|
|
@@ -595,12 +643,19 @@ rbs_ast_members_attr_accessor_t *rbs_ast_members_attr_accessor_new(rbs_allocator
|
|
|
595
643
|
.annotations = annotations,
|
|
596
644
|
.comment = comment,
|
|
597
645
|
.visibility = visibility,
|
|
646
|
+
.keyword_range = keyword_range,
|
|
647
|
+
.name_range = name_range,
|
|
648
|
+
.colon_range = colon_range,
|
|
649
|
+
.kind_range = RBS_LOCATION_NULL_RANGE,
|
|
650
|
+
.ivar_range = RBS_LOCATION_NULL_RANGE,
|
|
651
|
+
.ivar_name_range = RBS_LOCATION_NULL_RANGE,
|
|
652
|
+
.visibility_range = RBS_LOCATION_NULL_RANGE,
|
|
598
653
|
};
|
|
599
654
|
|
|
600
655
|
return instance;
|
|
601
656
|
}
|
|
602
|
-
#line
|
|
603
|
-
rbs_ast_members_attr_reader_t *rbs_ast_members_attr_reader_new(rbs_allocator_t *allocator,
|
|
657
|
+
#line 140 "templates/src/ast.c.erb"
|
|
658
|
+
rbs_ast_members_attr_reader_t *RBS_NONNULL rbs_ast_members_attr_reader_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_ast_symbol_t *RBS_NONNULL name, rbs_node_t *RBS_NONNULL type, rbs_attr_ivar_name_t ivar_name, enum rbs_attribute_kind kind, rbs_node_list_t *RBS_NONNULL annotations, rbs_ast_comment_t *RBS_NULLABLE comment, enum rbs_attribute_visibility visibility, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range colon_range) {
|
|
604
659
|
rbs_ast_members_attr_reader_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_attr_reader_t);
|
|
605
660
|
|
|
606
661
|
*instance = (rbs_ast_members_attr_reader_t) {
|
|
@@ -615,12 +670,19 @@ rbs_ast_members_attr_reader_t *rbs_ast_members_attr_reader_new(rbs_allocator_t *
|
|
|
615
670
|
.annotations = annotations,
|
|
616
671
|
.comment = comment,
|
|
617
672
|
.visibility = visibility,
|
|
673
|
+
.keyword_range = keyword_range,
|
|
674
|
+
.name_range = name_range,
|
|
675
|
+
.colon_range = colon_range,
|
|
676
|
+
.kind_range = RBS_LOCATION_NULL_RANGE,
|
|
677
|
+
.ivar_range = RBS_LOCATION_NULL_RANGE,
|
|
678
|
+
.ivar_name_range = RBS_LOCATION_NULL_RANGE,
|
|
679
|
+
.visibility_range = RBS_LOCATION_NULL_RANGE,
|
|
618
680
|
};
|
|
619
681
|
|
|
620
682
|
return instance;
|
|
621
683
|
}
|
|
622
|
-
#line
|
|
623
|
-
rbs_ast_members_attr_writer_t *rbs_ast_members_attr_writer_new(rbs_allocator_t *allocator,
|
|
684
|
+
#line 140 "templates/src/ast.c.erb"
|
|
685
|
+
rbs_ast_members_attr_writer_t *RBS_NONNULL rbs_ast_members_attr_writer_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_ast_symbol_t *RBS_NONNULL name, rbs_node_t *RBS_NONNULL type, rbs_attr_ivar_name_t ivar_name, enum rbs_attribute_kind kind, rbs_node_list_t *RBS_NONNULL annotations, rbs_ast_comment_t *RBS_NULLABLE comment, enum rbs_attribute_visibility visibility, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range colon_range) {
|
|
624
686
|
rbs_ast_members_attr_writer_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_attr_writer_t);
|
|
625
687
|
|
|
626
688
|
*instance = (rbs_ast_members_attr_writer_t) {
|
|
@@ -635,12 +697,19 @@ rbs_ast_members_attr_writer_t *rbs_ast_members_attr_writer_new(rbs_allocator_t *
|
|
|
635
697
|
.annotations = annotations,
|
|
636
698
|
.comment = comment,
|
|
637
699
|
.visibility = visibility,
|
|
700
|
+
.keyword_range = keyword_range,
|
|
701
|
+
.name_range = name_range,
|
|
702
|
+
.colon_range = colon_range,
|
|
703
|
+
.kind_range = RBS_LOCATION_NULL_RANGE,
|
|
704
|
+
.ivar_range = RBS_LOCATION_NULL_RANGE,
|
|
705
|
+
.ivar_name_range = RBS_LOCATION_NULL_RANGE,
|
|
706
|
+
.visibility_range = RBS_LOCATION_NULL_RANGE,
|
|
638
707
|
};
|
|
639
708
|
|
|
640
709
|
return instance;
|
|
641
710
|
}
|
|
642
|
-
#line
|
|
643
|
-
rbs_ast_members_class_instance_variable_t *rbs_ast_members_class_instance_variable_new(rbs_allocator_t *allocator,
|
|
711
|
+
#line 140 "templates/src/ast.c.erb"
|
|
712
|
+
rbs_ast_members_class_instance_variable_t *RBS_NONNULL rbs_ast_members_class_instance_variable_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_ast_symbol_t *RBS_NONNULL name, rbs_node_t *RBS_NONNULL type, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_location_range name_range, rbs_location_range colon_range) {
|
|
644
713
|
rbs_ast_members_class_instance_variable_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_class_instance_variable_t);
|
|
645
714
|
|
|
646
715
|
*instance = (rbs_ast_members_class_instance_variable_t) {
|
|
@@ -651,12 +720,15 @@ rbs_ast_members_class_instance_variable_t *rbs_ast_members_class_instance_variab
|
|
|
651
720
|
.name = name,
|
|
652
721
|
.type = type,
|
|
653
722
|
.comment = comment,
|
|
723
|
+
.name_range = name_range,
|
|
724
|
+
.colon_range = colon_range,
|
|
725
|
+
.kind_range = RBS_LOCATION_NULL_RANGE,
|
|
654
726
|
};
|
|
655
727
|
|
|
656
728
|
return instance;
|
|
657
729
|
}
|
|
658
|
-
#line
|
|
659
|
-
rbs_ast_members_class_variable_t *rbs_ast_members_class_variable_new(rbs_allocator_t *allocator,
|
|
730
|
+
#line 140 "templates/src/ast.c.erb"
|
|
731
|
+
rbs_ast_members_class_variable_t *RBS_NONNULL rbs_ast_members_class_variable_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_ast_symbol_t *RBS_NONNULL name, rbs_node_t *RBS_NONNULL type, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_location_range name_range, rbs_location_range colon_range) {
|
|
660
732
|
rbs_ast_members_class_variable_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_class_variable_t);
|
|
661
733
|
|
|
662
734
|
*instance = (rbs_ast_members_class_variable_t) {
|
|
@@ -667,12 +739,15 @@ rbs_ast_members_class_variable_t *rbs_ast_members_class_variable_new(rbs_allocat
|
|
|
667
739
|
.name = name,
|
|
668
740
|
.type = type,
|
|
669
741
|
.comment = comment,
|
|
742
|
+
.name_range = name_range,
|
|
743
|
+
.colon_range = colon_range,
|
|
744
|
+
.kind_range = RBS_LOCATION_NULL_RANGE,
|
|
670
745
|
};
|
|
671
746
|
|
|
672
747
|
return instance;
|
|
673
748
|
}
|
|
674
|
-
#line
|
|
675
|
-
rbs_ast_members_extend_t *rbs_ast_members_extend_new(rbs_allocator_t *allocator,
|
|
749
|
+
#line 140 "templates/src/ast.c.erb"
|
|
750
|
+
rbs_ast_members_extend_t *RBS_NONNULL rbs_ast_members_extend_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL args, rbs_node_list_t *RBS_NONNULL annotations, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_location_range name_range, rbs_location_range keyword_range) {
|
|
676
751
|
rbs_ast_members_extend_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_extend_t);
|
|
677
752
|
|
|
678
753
|
*instance = (rbs_ast_members_extend_t) {
|
|
@@ -684,12 +759,15 @@ rbs_ast_members_extend_t *rbs_ast_members_extend_new(rbs_allocator_t *allocator,
|
|
|
684
759
|
.args = args,
|
|
685
760
|
.annotations = annotations,
|
|
686
761
|
.comment = comment,
|
|
762
|
+
.name_range = name_range,
|
|
763
|
+
.keyword_range = keyword_range,
|
|
764
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
687
765
|
};
|
|
688
766
|
|
|
689
767
|
return instance;
|
|
690
768
|
}
|
|
691
|
-
#line
|
|
692
|
-
rbs_ast_members_include_t *rbs_ast_members_include_new(rbs_allocator_t *allocator,
|
|
769
|
+
#line 140 "templates/src/ast.c.erb"
|
|
770
|
+
rbs_ast_members_include_t *RBS_NONNULL rbs_ast_members_include_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL args, rbs_node_list_t *RBS_NONNULL annotations, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_location_range name_range, rbs_location_range keyword_range) {
|
|
693
771
|
rbs_ast_members_include_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_include_t);
|
|
694
772
|
|
|
695
773
|
*instance = (rbs_ast_members_include_t) {
|
|
@@ -701,12 +779,15 @@ rbs_ast_members_include_t *rbs_ast_members_include_new(rbs_allocator_t *allocato
|
|
|
701
779
|
.args = args,
|
|
702
780
|
.annotations = annotations,
|
|
703
781
|
.comment = comment,
|
|
782
|
+
.name_range = name_range,
|
|
783
|
+
.keyword_range = keyword_range,
|
|
784
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
704
785
|
};
|
|
705
786
|
|
|
706
787
|
return instance;
|
|
707
788
|
}
|
|
708
|
-
#line
|
|
709
|
-
rbs_ast_members_instance_variable_t *rbs_ast_members_instance_variable_new(rbs_allocator_t *allocator,
|
|
789
|
+
#line 140 "templates/src/ast.c.erb"
|
|
790
|
+
rbs_ast_members_instance_variable_t *RBS_NONNULL rbs_ast_members_instance_variable_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_ast_symbol_t *RBS_NONNULL name, rbs_node_t *RBS_NONNULL type, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_location_range name_range, rbs_location_range colon_range) {
|
|
710
791
|
rbs_ast_members_instance_variable_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_instance_variable_t);
|
|
711
792
|
|
|
712
793
|
*instance = (rbs_ast_members_instance_variable_t) {
|
|
@@ -717,12 +798,15 @@ rbs_ast_members_instance_variable_t *rbs_ast_members_instance_variable_new(rbs_a
|
|
|
717
798
|
.name = name,
|
|
718
799
|
.type = type,
|
|
719
800
|
.comment = comment,
|
|
801
|
+
.name_range = name_range,
|
|
802
|
+
.colon_range = colon_range,
|
|
803
|
+
.kind_range = RBS_LOCATION_NULL_RANGE,
|
|
720
804
|
};
|
|
721
805
|
|
|
722
806
|
return instance;
|
|
723
807
|
}
|
|
724
|
-
#line
|
|
725
|
-
rbs_ast_members_method_definition_t *rbs_ast_members_method_definition_new(rbs_allocator_t *allocator,
|
|
808
|
+
#line 140 "templates/src/ast.c.erb"
|
|
809
|
+
rbs_ast_members_method_definition_t *RBS_NONNULL rbs_ast_members_method_definition_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_ast_symbol_t *RBS_NONNULL name, enum rbs_method_definition_kind kind, rbs_node_list_t *RBS_NONNULL overloads, rbs_node_list_t *RBS_NONNULL annotations, rbs_ast_comment_t *RBS_NULLABLE comment, bool overloading, enum rbs_method_definition_visibility visibility, rbs_location_range keyword_range, rbs_location_range name_range) {
|
|
726
810
|
rbs_ast_members_method_definition_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_method_definition_t);
|
|
727
811
|
|
|
728
812
|
*instance = (rbs_ast_members_method_definition_t) {
|
|
@@ -737,12 +821,17 @@ rbs_ast_members_method_definition_t *rbs_ast_members_method_definition_new(rbs_a
|
|
|
737
821
|
.comment = comment,
|
|
738
822
|
.overloading = overloading,
|
|
739
823
|
.visibility = visibility,
|
|
824
|
+
.keyword_range = keyword_range,
|
|
825
|
+
.name_range = name_range,
|
|
826
|
+
.kind_range = RBS_LOCATION_NULL_RANGE,
|
|
827
|
+
.overloading_range = RBS_LOCATION_NULL_RANGE,
|
|
828
|
+
.visibility_range = RBS_LOCATION_NULL_RANGE,
|
|
740
829
|
};
|
|
741
830
|
|
|
742
831
|
return instance;
|
|
743
832
|
}
|
|
744
|
-
#line
|
|
745
|
-
rbs_ast_members_method_definition_overload_t *rbs_ast_members_method_definition_overload_new(rbs_allocator_t *allocator,
|
|
833
|
+
#line 140 "templates/src/ast.c.erb"
|
|
834
|
+
rbs_ast_members_method_definition_overload_t *RBS_NONNULL rbs_ast_members_method_definition_overload_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_list_t *RBS_NONNULL annotations, rbs_node_t *RBS_NONNULL method_type) {
|
|
746
835
|
rbs_ast_members_method_definition_overload_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_method_definition_overload_t);
|
|
747
836
|
|
|
748
837
|
*instance = (rbs_ast_members_method_definition_overload_t) {
|
|
@@ -756,8 +845,8 @@ rbs_ast_members_method_definition_overload_t *rbs_ast_members_method_definition_
|
|
|
756
845
|
|
|
757
846
|
return instance;
|
|
758
847
|
}
|
|
759
|
-
#line
|
|
760
|
-
rbs_ast_members_prepend_t *rbs_ast_members_prepend_new(rbs_allocator_t *allocator,
|
|
848
|
+
#line 140 "templates/src/ast.c.erb"
|
|
849
|
+
rbs_ast_members_prepend_t *RBS_NONNULL rbs_ast_members_prepend_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL args, rbs_node_list_t *RBS_NONNULL annotations, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_location_range name_range, rbs_location_range keyword_range) {
|
|
761
850
|
rbs_ast_members_prepend_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_prepend_t);
|
|
762
851
|
|
|
763
852
|
*instance = (rbs_ast_members_prepend_t) {
|
|
@@ -769,12 +858,15 @@ rbs_ast_members_prepend_t *rbs_ast_members_prepend_new(rbs_allocator_t *allocato
|
|
|
769
858
|
.args = args,
|
|
770
859
|
.annotations = annotations,
|
|
771
860
|
.comment = comment,
|
|
861
|
+
.name_range = name_range,
|
|
862
|
+
.keyword_range = keyword_range,
|
|
863
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
772
864
|
};
|
|
773
865
|
|
|
774
866
|
return instance;
|
|
775
867
|
}
|
|
776
|
-
#line
|
|
777
|
-
rbs_ast_members_private_t *rbs_ast_members_private_new(rbs_allocator_t *allocator,
|
|
868
|
+
#line 140 "templates/src/ast.c.erb"
|
|
869
|
+
rbs_ast_members_private_t *RBS_NONNULL rbs_ast_members_private_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location) {
|
|
778
870
|
rbs_ast_members_private_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_private_t);
|
|
779
871
|
|
|
780
872
|
*instance = (rbs_ast_members_private_t) {
|
|
@@ -786,8 +878,8 @@ rbs_ast_members_private_t *rbs_ast_members_private_new(rbs_allocator_t *allocato
|
|
|
786
878
|
|
|
787
879
|
return instance;
|
|
788
880
|
}
|
|
789
|
-
#line
|
|
790
|
-
rbs_ast_members_public_t *rbs_ast_members_public_new(rbs_allocator_t *allocator,
|
|
881
|
+
#line 140 "templates/src/ast.c.erb"
|
|
882
|
+
rbs_ast_members_public_t *RBS_NONNULL rbs_ast_members_public_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location) {
|
|
791
883
|
rbs_ast_members_public_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_public_t);
|
|
792
884
|
|
|
793
885
|
*instance = (rbs_ast_members_public_t) {
|
|
@@ -799,8 +891,46 @@ rbs_ast_members_public_t *rbs_ast_members_public_new(rbs_allocator_t *allocator,
|
|
|
799
891
|
|
|
800
892
|
return instance;
|
|
801
893
|
}
|
|
802
|
-
#line
|
|
803
|
-
|
|
894
|
+
#line 140 "templates/src/ast.c.erb"
|
|
895
|
+
rbs_ast_ruby_annotations_block_param_type_annotation_t *RBS_NONNULL rbs_ast_ruby_annotations_block_param_type_annotation_new(rbs_allocator_t *RBS_NONNULL 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 *RBS_NONNULL type_, rbs_location_range comment_location) {
|
|
896
|
+
rbs_ast_ruby_annotations_block_param_type_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_block_param_type_annotation_t);
|
|
897
|
+
|
|
898
|
+
*instance = (rbs_ast_ruby_annotations_block_param_type_annotation_t) {
|
|
899
|
+
.base = (rbs_node_t) {
|
|
900
|
+
.type = RBS_AST_RUBY_ANNOTATIONS_BLOCK_PARAM_TYPE_ANNOTATION,
|
|
901
|
+
.location = location,
|
|
902
|
+
},
|
|
903
|
+
.prefix_location = prefix_location,
|
|
904
|
+
.ampersand_location = ampersand_location,
|
|
905
|
+
.name_location = name_location,
|
|
906
|
+
.colon_location = colon_location,
|
|
907
|
+
.question_location = question_location,
|
|
908
|
+
.type_location = type_location,
|
|
909
|
+
.type_ = type_,
|
|
910
|
+
.comment_location = comment_location,
|
|
911
|
+
};
|
|
912
|
+
|
|
913
|
+
return instance;
|
|
914
|
+
}
|
|
915
|
+
#line 140 "templates/src/ast.c.erb"
|
|
916
|
+
rbs_ast_ruby_annotations_class_alias_annotation_t *RBS_NONNULL rbs_ast_ruby_annotations_class_alias_annotation_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range keyword_location, rbs_type_name_t *RBS_NONNULL type_name, rbs_location_range type_name_location) {
|
|
917
|
+
rbs_ast_ruby_annotations_class_alias_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_class_alias_annotation_t);
|
|
918
|
+
|
|
919
|
+
*instance = (rbs_ast_ruby_annotations_class_alias_annotation_t) {
|
|
920
|
+
.base = (rbs_node_t) {
|
|
921
|
+
.type = RBS_AST_RUBY_ANNOTATIONS_CLASS_ALIAS_ANNOTATION,
|
|
922
|
+
.location = location,
|
|
923
|
+
},
|
|
924
|
+
.prefix_location = prefix_location,
|
|
925
|
+
.keyword_location = keyword_location,
|
|
926
|
+
.type_name = type_name,
|
|
927
|
+
.type_name_location = type_name_location,
|
|
928
|
+
};
|
|
929
|
+
|
|
930
|
+
return instance;
|
|
931
|
+
}
|
|
932
|
+
#line 140 "templates/src/ast.c.erb"
|
|
933
|
+
rbs_ast_ruby_annotations_colon_method_type_annotation_t *RBS_NONNULL rbs_ast_ruby_annotations_colon_method_type_annotation_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_node_list_t *RBS_NONNULL annotations, rbs_node_t *RBS_NONNULL method_type) {
|
|
804
934
|
rbs_ast_ruby_annotations_colon_method_type_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_colon_method_type_annotation_t);
|
|
805
935
|
|
|
806
936
|
*instance = (rbs_ast_ruby_annotations_colon_method_type_annotation_t) {
|
|
@@ -815,8 +945,46 @@ rbs_ast_ruby_annotations_colon_method_type_annotation_t *rbs_ast_ruby_annotation
|
|
|
815
945
|
|
|
816
946
|
return instance;
|
|
817
947
|
}
|
|
818
|
-
#line
|
|
819
|
-
|
|
948
|
+
#line 140 "templates/src/ast.c.erb"
|
|
949
|
+
rbs_ast_ruby_annotations_double_splat_param_type_annotation_t *RBS_NONNULL rbs_ast_ruby_annotations_double_splat_param_type_annotation_new(rbs_allocator_t *RBS_NONNULL 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 *RBS_NONNULL param_type, rbs_location_range comment_location) {
|
|
950
|
+
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);
|
|
951
|
+
|
|
952
|
+
*instance = (rbs_ast_ruby_annotations_double_splat_param_type_annotation_t) {
|
|
953
|
+
.base = (rbs_node_t) {
|
|
954
|
+
.type = RBS_AST_RUBY_ANNOTATIONS_DOUBLE_SPLAT_PARAM_TYPE_ANNOTATION,
|
|
955
|
+
.location = location,
|
|
956
|
+
},
|
|
957
|
+
.prefix_location = prefix_location,
|
|
958
|
+
.star2_location = star2_location,
|
|
959
|
+
.name_location = name_location,
|
|
960
|
+
.colon_location = colon_location,
|
|
961
|
+
.param_type = param_type,
|
|
962
|
+
.comment_location = comment_location,
|
|
963
|
+
};
|
|
964
|
+
|
|
965
|
+
return instance;
|
|
966
|
+
}
|
|
967
|
+
#line 140 "templates/src/ast.c.erb"
|
|
968
|
+
rbs_ast_ruby_annotations_instance_variable_annotation_t *RBS_NONNULL rbs_ast_ruby_annotations_instance_variable_annotation_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_ast_symbol_t *RBS_NONNULL ivar_name, rbs_location_range ivar_name_location, rbs_location_range colon_location, rbs_node_t *RBS_NONNULL type, rbs_location_range comment_location) {
|
|
969
|
+
rbs_ast_ruby_annotations_instance_variable_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_instance_variable_annotation_t);
|
|
970
|
+
|
|
971
|
+
*instance = (rbs_ast_ruby_annotations_instance_variable_annotation_t) {
|
|
972
|
+
.base = (rbs_node_t) {
|
|
973
|
+
.type = RBS_AST_RUBY_ANNOTATIONS_INSTANCE_VARIABLE_ANNOTATION,
|
|
974
|
+
.location = location,
|
|
975
|
+
},
|
|
976
|
+
.prefix_location = prefix_location,
|
|
977
|
+
.ivar_name = ivar_name,
|
|
978
|
+
.ivar_name_location = ivar_name_location,
|
|
979
|
+
.colon_location = colon_location,
|
|
980
|
+
.type = type,
|
|
981
|
+
.comment_location = comment_location,
|
|
982
|
+
};
|
|
983
|
+
|
|
984
|
+
return instance;
|
|
985
|
+
}
|
|
986
|
+
#line 140 "templates/src/ast.c.erb"
|
|
987
|
+
rbs_ast_ruby_annotations_method_types_annotation_t *RBS_NONNULL rbs_ast_ruby_annotations_method_types_annotation_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_node_list_t *RBS_NONNULL overloads, rbs_location_range_list_t *RBS_NONNULL vertical_bar_locations, rbs_location_range dot3_location) {
|
|
820
988
|
rbs_ast_ruby_annotations_method_types_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_method_types_annotation_t);
|
|
821
989
|
|
|
822
990
|
*instance = (rbs_ast_ruby_annotations_method_types_annotation_t) {
|
|
@@ -827,12 +995,52 @@ rbs_ast_ruby_annotations_method_types_annotation_t *rbs_ast_ruby_annotations_met
|
|
|
827
995
|
.prefix_location = prefix_location,
|
|
828
996
|
.overloads = overloads,
|
|
829
997
|
.vertical_bar_locations = vertical_bar_locations,
|
|
998
|
+
.dot3_location = dot3_location,
|
|
830
999
|
};
|
|
831
1000
|
|
|
832
1001
|
return instance;
|
|
833
1002
|
}
|
|
834
|
-
#line
|
|
835
|
-
|
|
1003
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1004
|
+
rbs_ast_ruby_annotations_module_alias_annotation_t *RBS_NONNULL rbs_ast_ruby_annotations_module_alias_annotation_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range keyword_location, rbs_type_name_t *RBS_NONNULL type_name, rbs_location_range type_name_location) {
|
|
1005
|
+
rbs_ast_ruby_annotations_module_alias_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_module_alias_annotation_t);
|
|
1006
|
+
|
|
1007
|
+
*instance = (rbs_ast_ruby_annotations_module_alias_annotation_t) {
|
|
1008
|
+
.base = (rbs_node_t) {
|
|
1009
|
+
.type = RBS_AST_RUBY_ANNOTATIONS_MODULE_ALIAS_ANNOTATION,
|
|
1010
|
+
.location = location,
|
|
1011
|
+
},
|
|
1012
|
+
.prefix_location = prefix_location,
|
|
1013
|
+
.keyword_location = keyword_location,
|
|
1014
|
+
.type_name = type_name,
|
|
1015
|
+
.type_name_location = type_name_location,
|
|
1016
|
+
};
|
|
1017
|
+
|
|
1018
|
+
return instance;
|
|
1019
|
+
}
|
|
1020
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1021
|
+
rbs_ast_ruby_annotations_module_self_annotation_t *RBS_NONNULL rbs_ast_ruby_annotations_module_self_annotation_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range keyword_location, rbs_location_range colon_location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL args, rbs_location_range open_bracket_location, rbs_location_range close_bracket_location, rbs_location_range_list_t *RBS_NONNULL args_comma_locations, rbs_location_range comment_location) {
|
|
1022
|
+
rbs_ast_ruby_annotations_module_self_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_module_self_annotation_t);
|
|
1023
|
+
|
|
1024
|
+
*instance = (rbs_ast_ruby_annotations_module_self_annotation_t) {
|
|
1025
|
+
.base = (rbs_node_t) {
|
|
1026
|
+
.type = RBS_AST_RUBY_ANNOTATIONS_MODULE_SELF_ANNOTATION,
|
|
1027
|
+
.location = location,
|
|
1028
|
+
},
|
|
1029
|
+
.prefix_location = prefix_location,
|
|
1030
|
+
.keyword_location = keyword_location,
|
|
1031
|
+
.colon_location = colon_location,
|
|
1032
|
+
.name = name,
|
|
1033
|
+
.args = args,
|
|
1034
|
+
.open_bracket_location = open_bracket_location,
|
|
1035
|
+
.close_bracket_location = close_bracket_location,
|
|
1036
|
+
.args_comma_locations = args_comma_locations,
|
|
1037
|
+
.comment_location = comment_location,
|
|
1038
|
+
};
|
|
1039
|
+
|
|
1040
|
+
return instance;
|
|
1041
|
+
}
|
|
1042
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1043
|
+
rbs_ast_ruby_annotations_node_type_assertion_t *RBS_NONNULL rbs_ast_ruby_annotations_node_type_assertion_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_node_t *RBS_NONNULL type) {
|
|
836
1044
|
rbs_ast_ruby_annotations_node_type_assertion_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_node_type_assertion_t);
|
|
837
1045
|
|
|
838
1046
|
*instance = (rbs_ast_ruby_annotations_node_type_assertion_t) {
|
|
@@ -846,8 +1054,26 @@ rbs_ast_ruby_annotations_node_type_assertion_t *rbs_ast_ruby_annotations_node_ty
|
|
|
846
1054
|
|
|
847
1055
|
return instance;
|
|
848
1056
|
}
|
|
849
|
-
#line
|
|
850
|
-
|
|
1057
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1058
|
+
rbs_ast_ruby_annotations_param_type_annotation_t *RBS_NONNULL rbs_ast_ruby_annotations_param_type_annotation_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range name_location, rbs_location_range colon_location, rbs_node_t *RBS_NONNULL param_type, rbs_location_range comment_location) {
|
|
1059
|
+
rbs_ast_ruby_annotations_param_type_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_param_type_annotation_t);
|
|
1060
|
+
|
|
1061
|
+
*instance = (rbs_ast_ruby_annotations_param_type_annotation_t) {
|
|
1062
|
+
.base = (rbs_node_t) {
|
|
1063
|
+
.type = RBS_AST_RUBY_ANNOTATIONS_PARAM_TYPE_ANNOTATION,
|
|
1064
|
+
.location = location,
|
|
1065
|
+
},
|
|
1066
|
+
.prefix_location = prefix_location,
|
|
1067
|
+
.name_location = name_location,
|
|
1068
|
+
.colon_location = colon_location,
|
|
1069
|
+
.param_type = param_type,
|
|
1070
|
+
.comment_location = comment_location,
|
|
1071
|
+
};
|
|
1072
|
+
|
|
1073
|
+
return instance;
|
|
1074
|
+
}
|
|
1075
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1076
|
+
rbs_ast_ruby_annotations_return_type_annotation_t *RBS_NONNULL rbs_ast_ruby_annotations_return_type_annotation_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range return_location, rbs_location_range colon_location, rbs_node_t *RBS_NONNULL return_type, rbs_location_range comment_location) {
|
|
851
1077
|
rbs_ast_ruby_annotations_return_type_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_return_type_annotation_t);
|
|
852
1078
|
|
|
853
1079
|
*instance = (rbs_ast_ruby_annotations_return_type_annotation_t) {
|
|
@@ -864,8 +1090,8 @@ rbs_ast_ruby_annotations_return_type_annotation_t *rbs_ast_ruby_annotations_retu
|
|
|
864
1090
|
|
|
865
1091
|
return instance;
|
|
866
1092
|
}
|
|
867
|
-
#line
|
|
868
|
-
rbs_ast_ruby_annotations_skip_annotation_t *rbs_ast_ruby_annotations_skip_annotation_new(rbs_allocator_t *allocator,
|
|
1093
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1094
|
+
rbs_ast_ruby_annotations_skip_annotation_t *RBS_NONNULL rbs_ast_ruby_annotations_skip_annotation_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range skip_location, rbs_location_range comment_location) {
|
|
869
1095
|
rbs_ast_ruby_annotations_skip_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_skip_annotation_t);
|
|
870
1096
|
|
|
871
1097
|
*instance = (rbs_ast_ruby_annotations_skip_annotation_t) {
|
|
@@ -880,8 +1106,44 @@ rbs_ast_ruby_annotations_skip_annotation_t *rbs_ast_ruby_annotations_skip_annota
|
|
|
880
1106
|
|
|
881
1107
|
return instance;
|
|
882
1108
|
}
|
|
883
|
-
#line
|
|
884
|
-
|
|
1109
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1110
|
+
rbs_ast_ruby_annotations_splat_param_type_annotation_t *RBS_NONNULL rbs_ast_ruby_annotations_splat_param_type_annotation_new(rbs_allocator_t *RBS_NONNULL 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 *RBS_NONNULL param_type, rbs_location_range comment_location) {
|
|
1111
|
+
rbs_ast_ruby_annotations_splat_param_type_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_splat_param_type_annotation_t);
|
|
1112
|
+
|
|
1113
|
+
*instance = (rbs_ast_ruby_annotations_splat_param_type_annotation_t) {
|
|
1114
|
+
.base = (rbs_node_t) {
|
|
1115
|
+
.type = RBS_AST_RUBY_ANNOTATIONS_SPLAT_PARAM_TYPE_ANNOTATION,
|
|
1116
|
+
.location = location,
|
|
1117
|
+
},
|
|
1118
|
+
.prefix_location = prefix_location,
|
|
1119
|
+
.star_location = star_location,
|
|
1120
|
+
.name_location = name_location,
|
|
1121
|
+
.colon_location = colon_location,
|
|
1122
|
+
.param_type = param_type,
|
|
1123
|
+
.comment_location = comment_location,
|
|
1124
|
+
};
|
|
1125
|
+
|
|
1126
|
+
return instance;
|
|
1127
|
+
}
|
|
1128
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1129
|
+
rbs_ast_ruby_annotations_type_application_annotation_t *RBS_NONNULL rbs_ast_ruby_annotations_type_application_annotation_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_node_list_t *RBS_NONNULL type_args, rbs_location_range close_bracket_location, rbs_location_range_list_t *RBS_NONNULL comma_locations) {
|
|
1130
|
+
rbs_ast_ruby_annotations_type_application_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_type_application_annotation_t);
|
|
1131
|
+
|
|
1132
|
+
*instance = (rbs_ast_ruby_annotations_type_application_annotation_t) {
|
|
1133
|
+
.base = (rbs_node_t) {
|
|
1134
|
+
.type = RBS_AST_RUBY_ANNOTATIONS_TYPE_APPLICATION_ANNOTATION,
|
|
1135
|
+
.location = location,
|
|
1136
|
+
},
|
|
1137
|
+
.prefix_location = prefix_location,
|
|
1138
|
+
.type_args = type_args,
|
|
1139
|
+
.close_bracket_location = close_bracket_location,
|
|
1140
|
+
.comma_locations = comma_locations,
|
|
1141
|
+
};
|
|
1142
|
+
|
|
1143
|
+
return instance;
|
|
1144
|
+
}
|
|
1145
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1146
|
+
rbs_ast_string_t *RBS_NONNULL rbs_ast_string_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_string_t string) {
|
|
885
1147
|
rbs_ast_string_t *instance = rbs_allocator_alloc(allocator, rbs_ast_string_t);
|
|
886
1148
|
|
|
887
1149
|
*instance = (rbs_ast_string_t) {
|
|
@@ -894,8 +1156,8 @@ rbs_ast_string_t *rbs_ast_string_new(rbs_allocator_t *allocator, rbs_location_t
|
|
|
894
1156
|
|
|
895
1157
|
return instance;
|
|
896
1158
|
}
|
|
897
|
-
#line
|
|
898
|
-
rbs_ast_type_param_t *rbs_ast_type_param_new(rbs_allocator_t *allocator,
|
|
1159
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1160
|
+
rbs_ast_type_param_t *RBS_NONNULL rbs_ast_type_param_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_ast_symbol_t *RBS_NONNULL name, enum rbs_type_param_variance variance, rbs_node_t *RBS_NULLABLE upper_bound, rbs_node_t *RBS_NULLABLE lower_bound, rbs_node_t *RBS_NULLABLE default_type, bool unchecked, rbs_location_range name_range) {
|
|
899
1161
|
rbs_ast_type_param_t *instance = rbs_allocator_alloc(allocator, rbs_ast_type_param_t);
|
|
900
1162
|
|
|
901
1163
|
*instance = (rbs_ast_type_param_t) {
|
|
@@ -906,14 +1168,21 @@ rbs_ast_type_param_t *rbs_ast_type_param_new(rbs_allocator_t *allocator, rbs_loc
|
|
|
906
1168
|
.name = name,
|
|
907
1169
|
.variance = variance,
|
|
908
1170
|
.upper_bound = upper_bound,
|
|
1171
|
+
.lower_bound = lower_bound,
|
|
909
1172
|
.default_type = default_type,
|
|
910
1173
|
.unchecked = unchecked,
|
|
1174
|
+
.name_range = name_range,
|
|
1175
|
+
.variance_range = RBS_LOCATION_NULL_RANGE,
|
|
1176
|
+
.unchecked_range = RBS_LOCATION_NULL_RANGE,
|
|
1177
|
+
.upper_bound_range = RBS_LOCATION_NULL_RANGE,
|
|
1178
|
+
.lower_bound_range = RBS_LOCATION_NULL_RANGE,
|
|
1179
|
+
.default_range = RBS_LOCATION_NULL_RANGE,
|
|
911
1180
|
};
|
|
912
1181
|
|
|
913
1182
|
return instance;
|
|
914
1183
|
}
|
|
915
|
-
#line
|
|
916
|
-
rbs_method_type_t *rbs_method_type_new(rbs_allocator_t *allocator,
|
|
1184
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1185
|
+
rbs_method_type_t *RBS_NONNULL rbs_method_type_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_list_t *RBS_NONNULL type_params, rbs_node_t *RBS_NONNULL type, rbs_types_block_t *RBS_NULLABLE block, rbs_location_range type_range) {
|
|
917
1186
|
rbs_method_type_t *instance = rbs_allocator_alloc(allocator, rbs_method_type_t);
|
|
918
1187
|
|
|
919
1188
|
*instance = (rbs_method_type_t) {
|
|
@@ -924,12 +1193,14 @@ rbs_method_type_t *rbs_method_type_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
924
1193
|
.type_params = type_params,
|
|
925
1194
|
.type = type,
|
|
926
1195
|
.block = block,
|
|
1196
|
+
.type_range = type_range,
|
|
1197
|
+
.type_params_range = RBS_LOCATION_NULL_RANGE,
|
|
927
1198
|
};
|
|
928
1199
|
|
|
929
1200
|
return instance;
|
|
930
1201
|
}
|
|
931
|
-
#line
|
|
932
|
-
rbs_namespace_t *rbs_namespace_new(rbs_allocator_t *allocator,
|
|
1202
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1203
|
+
rbs_namespace_t *RBS_NONNULL rbs_namespace_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_list_t *RBS_NONNULL path, bool absolute) {
|
|
933
1204
|
rbs_namespace_t *instance = rbs_allocator_alloc(allocator, rbs_namespace_t);
|
|
934
1205
|
|
|
935
1206
|
*instance = (rbs_namespace_t) {
|
|
@@ -943,8 +1214,8 @@ rbs_namespace_t *rbs_namespace_new(rbs_allocator_t *allocator, rbs_location_t *l
|
|
|
943
1214
|
|
|
944
1215
|
return instance;
|
|
945
1216
|
}
|
|
946
|
-
#line
|
|
947
|
-
rbs_signature_t *rbs_signature_new(rbs_allocator_t *allocator,
|
|
1217
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1218
|
+
rbs_signature_t *RBS_NONNULL rbs_signature_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_list_t *RBS_NONNULL directives, rbs_node_list_t *RBS_NONNULL declarations) {
|
|
948
1219
|
rbs_signature_t *instance = rbs_allocator_alloc(allocator, rbs_signature_t);
|
|
949
1220
|
|
|
950
1221
|
*instance = (rbs_signature_t) {
|
|
@@ -958,8 +1229,8 @@ rbs_signature_t *rbs_signature_new(rbs_allocator_t *allocator, rbs_location_t *l
|
|
|
958
1229
|
|
|
959
1230
|
return instance;
|
|
960
1231
|
}
|
|
961
|
-
#line
|
|
962
|
-
rbs_type_name_t *rbs_type_name_new(rbs_allocator_t *allocator,
|
|
1232
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1233
|
+
rbs_type_name_t *RBS_NONNULL rbs_type_name_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_namespace_t *RBS_NONNULL rbs_namespace, rbs_ast_symbol_t *RBS_NONNULL name) {
|
|
963
1234
|
rbs_type_name_t *instance = rbs_allocator_alloc(allocator, rbs_type_name_t);
|
|
964
1235
|
|
|
965
1236
|
*instance = (rbs_type_name_t) {
|
|
@@ -973,8 +1244,8 @@ rbs_type_name_t *rbs_type_name_new(rbs_allocator_t *allocator, rbs_location_t *l
|
|
|
973
1244
|
|
|
974
1245
|
return instance;
|
|
975
1246
|
}
|
|
976
|
-
#line
|
|
977
|
-
rbs_types_alias_t *rbs_types_alias_new(rbs_allocator_t *allocator,
|
|
1247
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1248
|
+
rbs_types_alias_t *RBS_NONNULL rbs_types_alias_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL args, rbs_location_range name_range) {
|
|
978
1249
|
rbs_types_alias_t *instance = rbs_allocator_alloc(allocator, rbs_types_alias_t);
|
|
979
1250
|
|
|
980
1251
|
*instance = (rbs_types_alias_t) {
|
|
@@ -984,12 +1255,14 @@ rbs_types_alias_t *rbs_types_alias_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
984
1255
|
},
|
|
985
1256
|
.name = name,
|
|
986
1257
|
.args = args,
|
|
1258
|
+
.name_range = name_range,
|
|
1259
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
987
1260
|
};
|
|
988
1261
|
|
|
989
1262
|
return instance;
|
|
990
1263
|
}
|
|
991
|
-
#line
|
|
992
|
-
rbs_types_bases_any_t *rbs_types_bases_any_new(rbs_allocator_t *allocator,
|
|
1264
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1265
|
+
rbs_types_bases_any_t *RBS_NONNULL rbs_types_bases_any_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, bool todo) {
|
|
993
1266
|
rbs_types_bases_any_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_any_t);
|
|
994
1267
|
|
|
995
1268
|
*instance = (rbs_types_bases_any_t) {
|
|
@@ -1002,8 +1275,8 @@ rbs_types_bases_any_t *rbs_types_bases_any_new(rbs_allocator_t *allocator, rbs_l
|
|
|
1002
1275
|
|
|
1003
1276
|
return instance;
|
|
1004
1277
|
}
|
|
1005
|
-
#line
|
|
1006
|
-
rbs_types_bases_bool_t *rbs_types_bases_bool_new(rbs_allocator_t *allocator,
|
|
1278
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1279
|
+
rbs_types_bases_bool_t *RBS_NONNULL rbs_types_bases_bool_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location) {
|
|
1007
1280
|
rbs_types_bases_bool_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_bool_t);
|
|
1008
1281
|
|
|
1009
1282
|
*instance = (rbs_types_bases_bool_t) {
|
|
@@ -1015,8 +1288,8 @@ rbs_types_bases_bool_t *rbs_types_bases_bool_new(rbs_allocator_t *allocator, rbs
|
|
|
1015
1288
|
|
|
1016
1289
|
return instance;
|
|
1017
1290
|
}
|
|
1018
|
-
#line
|
|
1019
|
-
rbs_types_bases_bottom_t *rbs_types_bases_bottom_new(rbs_allocator_t *allocator,
|
|
1291
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1292
|
+
rbs_types_bases_bottom_t *RBS_NONNULL rbs_types_bases_bottom_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location) {
|
|
1020
1293
|
rbs_types_bases_bottom_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_bottom_t);
|
|
1021
1294
|
|
|
1022
1295
|
*instance = (rbs_types_bases_bottom_t) {
|
|
@@ -1028,8 +1301,8 @@ rbs_types_bases_bottom_t *rbs_types_bases_bottom_new(rbs_allocator_t *allocator,
|
|
|
1028
1301
|
|
|
1029
1302
|
return instance;
|
|
1030
1303
|
}
|
|
1031
|
-
#line
|
|
1032
|
-
rbs_types_bases_class_t *rbs_types_bases_class_new(rbs_allocator_t *allocator,
|
|
1304
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1305
|
+
rbs_types_bases_class_t *RBS_NONNULL rbs_types_bases_class_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location) {
|
|
1033
1306
|
rbs_types_bases_class_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_class_t);
|
|
1034
1307
|
|
|
1035
1308
|
*instance = (rbs_types_bases_class_t) {
|
|
@@ -1041,8 +1314,8 @@ rbs_types_bases_class_t *rbs_types_bases_class_new(rbs_allocator_t *allocator, r
|
|
|
1041
1314
|
|
|
1042
1315
|
return instance;
|
|
1043
1316
|
}
|
|
1044
|
-
#line
|
|
1045
|
-
rbs_types_bases_instance_t *rbs_types_bases_instance_new(rbs_allocator_t *allocator,
|
|
1317
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1318
|
+
rbs_types_bases_instance_t *RBS_NONNULL rbs_types_bases_instance_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location) {
|
|
1046
1319
|
rbs_types_bases_instance_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_instance_t);
|
|
1047
1320
|
|
|
1048
1321
|
*instance = (rbs_types_bases_instance_t) {
|
|
@@ -1054,8 +1327,8 @@ rbs_types_bases_instance_t *rbs_types_bases_instance_new(rbs_allocator_t *alloca
|
|
|
1054
1327
|
|
|
1055
1328
|
return instance;
|
|
1056
1329
|
}
|
|
1057
|
-
#line
|
|
1058
|
-
rbs_types_bases_nil_t *rbs_types_bases_nil_new(rbs_allocator_t *allocator,
|
|
1330
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1331
|
+
rbs_types_bases_nil_t *RBS_NONNULL rbs_types_bases_nil_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location) {
|
|
1059
1332
|
rbs_types_bases_nil_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_nil_t);
|
|
1060
1333
|
|
|
1061
1334
|
*instance = (rbs_types_bases_nil_t) {
|
|
@@ -1067,8 +1340,8 @@ rbs_types_bases_nil_t *rbs_types_bases_nil_new(rbs_allocator_t *allocator, rbs_l
|
|
|
1067
1340
|
|
|
1068
1341
|
return instance;
|
|
1069
1342
|
}
|
|
1070
|
-
#line
|
|
1071
|
-
rbs_types_bases_self_t *rbs_types_bases_self_new(rbs_allocator_t *allocator,
|
|
1343
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1344
|
+
rbs_types_bases_self_t *RBS_NONNULL rbs_types_bases_self_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location) {
|
|
1072
1345
|
rbs_types_bases_self_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_self_t);
|
|
1073
1346
|
|
|
1074
1347
|
*instance = (rbs_types_bases_self_t) {
|
|
@@ -1080,8 +1353,8 @@ rbs_types_bases_self_t *rbs_types_bases_self_new(rbs_allocator_t *allocator, rbs
|
|
|
1080
1353
|
|
|
1081
1354
|
return instance;
|
|
1082
1355
|
}
|
|
1083
|
-
#line
|
|
1084
|
-
rbs_types_bases_top_t *rbs_types_bases_top_new(rbs_allocator_t *allocator,
|
|
1356
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1357
|
+
rbs_types_bases_top_t *RBS_NONNULL rbs_types_bases_top_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location) {
|
|
1085
1358
|
rbs_types_bases_top_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_top_t);
|
|
1086
1359
|
|
|
1087
1360
|
*instance = (rbs_types_bases_top_t) {
|
|
@@ -1093,8 +1366,8 @@ rbs_types_bases_top_t *rbs_types_bases_top_new(rbs_allocator_t *allocator, rbs_l
|
|
|
1093
1366
|
|
|
1094
1367
|
return instance;
|
|
1095
1368
|
}
|
|
1096
|
-
#line
|
|
1097
|
-
rbs_types_bases_void_t *rbs_types_bases_void_new(rbs_allocator_t *allocator,
|
|
1369
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1370
|
+
rbs_types_bases_void_t *RBS_NONNULL rbs_types_bases_void_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location) {
|
|
1098
1371
|
rbs_types_bases_void_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_void_t);
|
|
1099
1372
|
|
|
1100
1373
|
*instance = (rbs_types_bases_void_t) {
|
|
@@ -1106,8 +1379,8 @@ rbs_types_bases_void_t *rbs_types_bases_void_new(rbs_allocator_t *allocator, rbs
|
|
|
1106
1379
|
|
|
1107
1380
|
return instance;
|
|
1108
1381
|
}
|
|
1109
|
-
#line
|
|
1110
|
-
rbs_types_block_t *rbs_types_block_new(rbs_allocator_t *allocator,
|
|
1382
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1383
|
+
rbs_types_block_t *RBS_NONNULL rbs_types_block_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_t *RBS_NONNULL type, bool required, rbs_node_t *RBS_NULLABLE self_type) {
|
|
1111
1384
|
rbs_types_block_t *instance = rbs_allocator_alloc(allocator, rbs_types_block_t);
|
|
1112
1385
|
|
|
1113
1386
|
*instance = (rbs_types_block_t) {
|
|
@@ -1122,8 +1395,8 @@ rbs_types_block_t *rbs_types_block_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
1122
1395
|
|
|
1123
1396
|
return instance;
|
|
1124
1397
|
}
|
|
1125
|
-
#line
|
|
1126
|
-
rbs_types_class_instance_t *rbs_types_class_instance_new(rbs_allocator_t *allocator,
|
|
1398
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1399
|
+
rbs_types_class_instance_t *RBS_NONNULL rbs_types_class_instance_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL args, rbs_location_range name_range) {
|
|
1127
1400
|
rbs_types_class_instance_t *instance = rbs_allocator_alloc(allocator, rbs_types_class_instance_t);
|
|
1128
1401
|
|
|
1129
1402
|
*instance = (rbs_types_class_instance_t) {
|
|
@@ -1133,12 +1406,14 @@ rbs_types_class_instance_t *rbs_types_class_instance_new(rbs_allocator_t *alloca
|
|
|
1133
1406
|
},
|
|
1134
1407
|
.name = name,
|
|
1135
1408
|
.args = args,
|
|
1409
|
+
.name_range = name_range,
|
|
1410
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
1136
1411
|
};
|
|
1137
1412
|
|
|
1138
1413
|
return instance;
|
|
1139
1414
|
}
|
|
1140
|
-
#line
|
|
1141
|
-
rbs_types_class_singleton_t *rbs_types_class_singleton_new(rbs_allocator_t *allocator,
|
|
1415
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1416
|
+
rbs_types_class_singleton_t *RBS_NONNULL rbs_types_class_singleton_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL args, rbs_location_range name_range) {
|
|
1142
1417
|
rbs_types_class_singleton_t *instance = rbs_allocator_alloc(allocator, rbs_types_class_singleton_t);
|
|
1143
1418
|
|
|
1144
1419
|
*instance = (rbs_types_class_singleton_t) {
|
|
@@ -1147,12 +1422,15 @@ rbs_types_class_singleton_t *rbs_types_class_singleton_new(rbs_allocator_t *allo
|
|
|
1147
1422
|
.location = location,
|
|
1148
1423
|
},
|
|
1149
1424
|
.name = name,
|
|
1425
|
+
.args = args,
|
|
1426
|
+
.name_range = name_range,
|
|
1427
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
1150
1428
|
};
|
|
1151
1429
|
|
|
1152
1430
|
return instance;
|
|
1153
1431
|
}
|
|
1154
|
-
#line
|
|
1155
|
-
rbs_types_function_t *rbs_types_function_new(rbs_allocator_t *allocator,
|
|
1432
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1433
|
+
rbs_types_function_t *RBS_NONNULL rbs_types_function_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_list_t *RBS_NONNULL required_positionals, rbs_node_list_t *RBS_NONNULL optional_positionals, rbs_node_t *RBS_NULLABLE rest_positionals, rbs_node_list_t *RBS_NONNULL trailing_positionals, rbs_hash_t *RBS_NONNULL required_keywords, rbs_hash_t *RBS_NONNULL optional_keywords, rbs_node_t *RBS_NULLABLE rest_keywords, rbs_node_t *RBS_NONNULL return_type) {
|
|
1156
1434
|
rbs_types_function_t *instance = rbs_allocator_alloc(allocator, rbs_types_function_t);
|
|
1157
1435
|
|
|
1158
1436
|
*instance = (rbs_types_function_t) {
|
|
@@ -1172,8 +1450,8 @@ rbs_types_function_t *rbs_types_function_new(rbs_allocator_t *allocator, rbs_loc
|
|
|
1172
1450
|
|
|
1173
1451
|
return instance;
|
|
1174
1452
|
}
|
|
1175
|
-
#line
|
|
1176
|
-
rbs_types_function_param_t *rbs_types_function_param_new(rbs_allocator_t *allocator,
|
|
1453
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1454
|
+
rbs_types_function_param_t *RBS_NONNULL rbs_types_function_param_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_t *RBS_NONNULL type, rbs_ast_symbol_t *RBS_NULLABLE name) {
|
|
1177
1455
|
rbs_types_function_param_t *instance = rbs_allocator_alloc(allocator, rbs_types_function_param_t);
|
|
1178
1456
|
|
|
1179
1457
|
*instance = (rbs_types_function_param_t) {
|
|
@@ -1183,12 +1461,13 @@ rbs_types_function_param_t *rbs_types_function_param_new(rbs_allocator_t *alloca
|
|
|
1183
1461
|
},
|
|
1184
1462
|
.type = type,
|
|
1185
1463
|
.name = name,
|
|
1464
|
+
.name_range = RBS_LOCATION_NULL_RANGE,
|
|
1186
1465
|
};
|
|
1187
1466
|
|
|
1188
1467
|
return instance;
|
|
1189
1468
|
}
|
|
1190
|
-
#line
|
|
1191
|
-
rbs_types_interface_t *rbs_types_interface_new(rbs_allocator_t *allocator,
|
|
1469
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1470
|
+
rbs_types_interface_t *RBS_NONNULL rbs_types_interface_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL args, rbs_location_range name_range) {
|
|
1192
1471
|
rbs_types_interface_t *instance = rbs_allocator_alloc(allocator, rbs_types_interface_t);
|
|
1193
1472
|
|
|
1194
1473
|
*instance = (rbs_types_interface_t) {
|
|
@@ -1198,12 +1477,14 @@ rbs_types_interface_t *rbs_types_interface_new(rbs_allocator_t *allocator, rbs_l
|
|
|
1198
1477
|
},
|
|
1199
1478
|
.name = name,
|
|
1200
1479
|
.args = args,
|
|
1480
|
+
.name_range = name_range,
|
|
1481
|
+
.args_range = RBS_LOCATION_NULL_RANGE,
|
|
1201
1482
|
};
|
|
1202
1483
|
|
|
1203
1484
|
return instance;
|
|
1204
1485
|
}
|
|
1205
|
-
#line
|
|
1206
|
-
rbs_types_intersection_t *rbs_types_intersection_new(rbs_allocator_t *allocator,
|
|
1486
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1487
|
+
rbs_types_intersection_t *RBS_NONNULL rbs_types_intersection_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_list_t *RBS_NONNULL types) {
|
|
1207
1488
|
rbs_types_intersection_t *instance = rbs_allocator_alloc(allocator, rbs_types_intersection_t);
|
|
1208
1489
|
|
|
1209
1490
|
*instance = (rbs_types_intersection_t) {
|
|
@@ -1216,8 +1497,8 @@ rbs_types_intersection_t *rbs_types_intersection_new(rbs_allocator_t *allocator,
|
|
|
1216
1497
|
|
|
1217
1498
|
return instance;
|
|
1218
1499
|
}
|
|
1219
|
-
#line
|
|
1220
|
-
rbs_types_literal_t *rbs_types_literal_new(rbs_allocator_t *allocator,
|
|
1500
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1501
|
+
rbs_types_literal_t *RBS_NONNULL rbs_types_literal_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_t *RBS_NONNULL literal) {
|
|
1221
1502
|
rbs_types_literal_t *instance = rbs_allocator_alloc(allocator, rbs_types_literal_t);
|
|
1222
1503
|
|
|
1223
1504
|
*instance = (rbs_types_literal_t) {
|
|
@@ -1230,8 +1511,8 @@ rbs_types_literal_t *rbs_types_literal_new(rbs_allocator_t *allocator, rbs_locat
|
|
|
1230
1511
|
|
|
1231
1512
|
return instance;
|
|
1232
1513
|
}
|
|
1233
|
-
#line
|
|
1234
|
-
rbs_types_optional_t *rbs_types_optional_new(rbs_allocator_t *allocator,
|
|
1514
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1515
|
+
rbs_types_optional_t *RBS_NONNULL rbs_types_optional_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_t *RBS_NONNULL type) {
|
|
1235
1516
|
rbs_types_optional_t *instance = rbs_allocator_alloc(allocator, rbs_types_optional_t);
|
|
1236
1517
|
|
|
1237
1518
|
*instance = (rbs_types_optional_t) {
|
|
@@ -1244,8 +1525,8 @@ rbs_types_optional_t *rbs_types_optional_new(rbs_allocator_t *allocator, rbs_loc
|
|
|
1244
1525
|
|
|
1245
1526
|
return instance;
|
|
1246
1527
|
}
|
|
1247
|
-
#line
|
|
1248
|
-
rbs_types_proc_t *rbs_types_proc_new(rbs_allocator_t *allocator,
|
|
1528
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1529
|
+
rbs_types_proc_t *RBS_NONNULL rbs_types_proc_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_t *RBS_NONNULL type, rbs_types_block_t *RBS_NULLABLE block, rbs_node_t *RBS_NULLABLE self_type) {
|
|
1249
1530
|
rbs_types_proc_t *instance = rbs_allocator_alloc(allocator, rbs_types_proc_t);
|
|
1250
1531
|
|
|
1251
1532
|
*instance = (rbs_types_proc_t) {
|
|
@@ -1260,8 +1541,8 @@ rbs_types_proc_t *rbs_types_proc_new(rbs_allocator_t *allocator, rbs_location_t
|
|
|
1260
1541
|
|
|
1261
1542
|
return instance;
|
|
1262
1543
|
}
|
|
1263
|
-
#line
|
|
1264
|
-
rbs_types_record_t *rbs_types_record_new(rbs_allocator_t *allocator,
|
|
1544
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1545
|
+
rbs_types_record_t *RBS_NONNULL rbs_types_record_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_hash_t *RBS_NONNULL all_fields) {
|
|
1265
1546
|
rbs_types_record_t *instance = rbs_allocator_alloc(allocator, rbs_types_record_t);
|
|
1266
1547
|
|
|
1267
1548
|
*instance = (rbs_types_record_t) {
|
|
@@ -1274,8 +1555,8 @@ rbs_types_record_t *rbs_types_record_new(rbs_allocator_t *allocator, rbs_locatio
|
|
|
1274
1555
|
|
|
1275
1556
|
return instance;
|
|
1276
1557
|
}
|
|
1277
|
-
#line
|
|
1278
|
-
rbs_types_record_field_type_t *rbs_types_record_field_type_new(rbs_allocator_t *allocator,
|
|
1558
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1559
|
+
rbs_types_record_field_type_t *RBS_NONNULL rbs_types_record_field_type_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_t *RBS_NONNULL type, bool required) {
|
|
1279
1560
|
rbs_types_record_field_type_t *instance = rbs_allocator_alloc(allocator, rbs_types_record_field_type_t);
|
|
1280
1561
|
|
|
1281
1562
|
*instance = (rbs_types_record_field_type_t) {
|
|
@@ -1289,8 +1570,8 @@ rbs_types_record_field_type_t *rbs_types_record_field_type_new(rbs_allocator_t *
|
|
|
1289
1570
|
|
|
1290
1571
|
return instance;
|
|
1291
1572
|
}
|
|
1292
|
-
#line
|
|
1293
|
-
rbs_types_tuple_t *rbs_types_tuple_new(rbs_allocator_t *allocator,
|
|
1573
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1574
|
+
rbs_types_tuple_t *RBS_NONNULL rbs_types_tuple_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_list_t *RBS_NONNULL types) {
|
|
1294
1575
|
rbs_types_tuple_t *instance = rbs_allocator_alloc(allocator, rbs_types_tuple_t);
|
|
1295
1576
|
|
|
1296
1577
|
*instance = (rbs_types_tuple_t) {
|
|
@@ -1303,8 +1584,8 @@ rbs_types_tuple_t *rbs_types_tuple_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
1303
1584
|
|
|
1304
1585
|
return instance;
|
|
1305
1586
|
}
|
|
1306
|
-
#line
|
|
1307
|
-
rbs_types_union_t *rbs_types_union_new(rbs_allocator_t *allocator,
|
|
1587
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1588
|
+
rbs_types_union_t *RBS_NONNULL rbs_types_union_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_list_t *RBS_NONNULL types) {
|
|
1308
1589
|
rbs_types_union_t *instance = rbs_allocator_alloc(allocator, rbs_types_union_t);
|
|
1309
1590
|
|
|
1310
1591
|
*instance = (rbs_types_union_t) {
|
|
@@ -1317,8 +1598,8 @@ rbs_types_union_t *rbs_types_union_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
1317
1598
|
|
|
1318
1599
|
return instance;
|
|
1319
1600
|
}
|
|
1320
|
-
#line
|
|
1321
|
-
rbs_types_untyped_function_t *rbs_types_untyped_function_new(rbs_allocator_t *allocator,
|
|
1601
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1602
|
+
rbs_types_untyped_function_t *RBS_NONNULL rbs_types_untyped_function_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_t *RBS_NONNULL return_type) {
|
|
1322
1603
|
rbs_types_untyped_function_t *instance = rbs_allocator_alloc(allocator, rbs_types_untyped_function_t);
|
|
1323
1604
|
|
|
1324
1605
|
*instance = (rbs_types_untyped_function_t) {
|
|
@@ -1331,8 +1612,8 @@ rbs_types_untyped_function_t *rbs_types_untyped_function_new(rbs_allocator_t *al
|
|
|
1331
1612
|
|
|
1332
1613
|
return instance;
|
|
1333
1614
|
}
|
|
1334
|
-
#line
|
|
1335
|
-
rbs_types_variable_t *rbs_types_variable_new(rbs_allocator_t *allocator,
|
|
1615
|
+
#line 140 "templates/src/ast.c.erb"
|
|
1616
|
+
rbs_types_variable_t *RBS_NONNULL rbs_types_variable_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_ast_symbol_t *RBS_NONNULL name) {
|
|
1336
1617
|
rbs_types_variable_t *instance = rbs_allocator_alloc(allocator, rbs_types_variable_t);
|
|
1337
1618
|
|
|
1338
1619
|
*instance = (rbs_types_variable_t) {
|