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/include/rbs/ast.h
CHANGED
|
@@ -8,11 +8,57 @@
|
|
|
8
8
|
#ifndef RBS__AST_H
|
|
9
9
|
#define RBS__AST_H
|
|
10
10
|
|
|
11
|
+
#include "rbs/defines.h"
|
|
11
12
|
#include "rbs/util/rbs_allocator.h"
|
|
12
13
|
#include "rbs/util/rbs_constant_pool.h"
|
|
13
14
|
#include "string.h"
|
|
14
15
|
#include "location.h"
|
|
15
16
|
|
|
17
|
+
enum rbs_attribute_visibility {
|
|
18
|
+
RBS_ATTRIBUTE_VISIBILITY_UNSPECIFIED, /* unspecified (nil) */
|
|
19
|
+
RBS_ATTRIBUTE_VISIBILITY_PUBLIC, /* public (:public) */
|
|
20
|
+
RBS_ATTRIBUTE_VISIBILITY_PRIVATE, /* private (:private) */
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
enum rbs_attribute_kind {
|
|
24
|
+
RBS_ATTRIBUTE_KIND_INSTANCE, /* instance (:instance) */
|
|
25
|
+
RBS_ATTRIBUTE_KIND_SINGLETON, /* singleton (:singleton) */
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
enum rbs_alias_kind {
|
|
29
|
+
RBS_ALIAS_KIND_INSTANCE, /* instance (:instance) */
|
|
30
|
+
RBS_ALIAS_KIND_SINGLETON, /* singleton (:singleton) */
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
enum rbs_method_definition_kind {
|
|
34
|
+
RBS_METHOD_DEFINITION_KIND_INSTANCE, /* instance (:instance) */
|
|
35
|
+
RBS_METHOD_DEFINITION_KIND_SINGLETON, /* singleton (:singleton) */
|
|
36
|
+
RBS_METHOD_DEFINITION_KIND_SINGLETON_INSTANCE, /* singleton_instance (:singleton_instance) */
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
enum rbs_method_definition_visibility {
|
|
40
|
+
RBS_METHOD_DEFINITION_VISIBILITY_UNSPECIFIED, /* unspecified (nil) */
|
|
41
|
+
RBS_METHOD_DEFINITION_VISIBILITY_PUBLIC, /* public (:public) */
|
|
42
|
+
RBS_METHOD_DEFINITION_VISIBILITY_PRIVATE, /* private (:private) */
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
enum rbs_type_param_variance {
|
|
46
|
+
RBS_TYPE_PARAM_VARIANCE_INVARIANT, /* invariant (:invariant) */
|
|
47
|
+
RBS_TYPE_PARAM_VARIANCE_COVARIANT, /* covariant (:covariant) */
|
|
48
|
+
RBS_TYPE_PARAM_VARIANCE_CONTRAVARIANT, /* contravariant (:contravariant) */
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
enum rbs_attr_ivar_name_tag {
|
|
52
|
+
RBS_ATTR_IVAR_NAME_TAG_UNSPECIFIED, /* The attribute has inferred instance variable (nil) */
|
|
53
|
+
RBS_ATTR_IVAR_NAME_TAG_EMPTY, /* The attribute has no instance variable (false) */
|
|
54
|
+
RBS_ATTR_IVAR_NAME_TAG_NAME, /* The attribute has instance variable with the given name */
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
typedef struct rbs_attr_ivar_name {
|
|
58
|
+
enum rbs_attr_ivar_name_tag tag;
|
|
59
|
+
rbs_constant_id_t name; /* valid when tag == RBS_ATTR_IVAR_NAME_TAG_NAME */
|
|
60
|
+
} rbs_attr_ivar_name_t;
|
|
61
|
+
|
|
16
62
|
enum rbs_node_type {
|
|
17
63
|
RBS_AST_ANNOTATION = 1,
|
|
18
64
|
RBS_AST_BOOL = 2,
|
|
@@ -45,94 +91,102 @@ enum rbs_node_type {
|
|
|
45
91
|
RBS_AST_MEMBERS_PREPEND = 29,
|
|
46
92
|
RBS_AST_MEMBERS_PRIVATE = 30,
|
|
47
93
|
RBS_AST_MEMBERS_PUBLIC = 31,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
94
|
+
RBS_AST_RUBY_ANNOTATIONS_BLOCK_PARAM_TYPE_ANNOTATION = 32,
|
|
95
|
+
RBS_AST_RUBY_ANNOTATIONS_CLASS_ALIAS_ANNOTATION = 33,
|
|
96
|
+
RBS_AST_RUBY_ANNOTATIONS_COLON_METHOD_TYPE_ANNOTATION = 34,
|
|
97
|
+
RBS_AST_RUBY_ANNOTATIONS_DOUBLE_SPLAT_PARAM_TYPE_ANNOTATION = 35,
|
|
98
|
+
RBS_AST_RUBY_ANNOTATIONS_INSTANCE_VARIABLE_ANNOTATION = 36,
|
|
99
|
+
RBS_AST_RUBY_ANNOTATIONS_METHOD_TYPES_ANNOTATION = 37,
|
|
100
|
+
RBS_AST_RUBY_ANNOTATIONS_MODULE_ALIAS_ANNOTATION = 38,
|
|
101
|
+
RBS_AST_RUBY_ANNOTATIONS_MODULE_SELF_ANNOTATION = 39,
|
|
102
|
+
RBS_AST_RUBY_ANNOTATIONS_NODE_TYPE_ASSERTION = 40,
|
|
103
|
+
RBS_AST_RUBY_ANNOTATIONS_PARAM_TYPE_ANNOTATION = 41,
|
|
104
|
+
RBS_AST_RUBY_ANNOTATIONS_RETURN_TYPE_ANNOTATION = 42,
|
|
105
|
+
RBS_AST_RUBY_ANNOTATIONS_SKIP_ANNOTATION = 43,
|
|
106
|
+
RBS_AST_RUBY_ANNOTATIONS_SPLAT_PARAM_TYPE_ANNOTATION = 44,
|
|
107
|
+
RBS_AST_RUBY_ANNOTATIONS_TYPE_APPLICATION_ANNOTATION = 45,
|
|
108
|
+
RBS_AST_STRING = 46,
|
|
109
|
+
RBS_AST_TYPE_PARAM = 47,
|
|
110
|
+
RBS_METHOD_TYPE = 48,
|
|
111
|
+
RBS_NAMESPACE = 49,
|
|
112
|
+
RBS_SIGNATURE = 50,
|
|
113
|
+
RBS_TYPE_NAME = 51,
|
|
114
|
+
RBS_TYPES_ALIAS = 52,
|
|
115
|
+
RBS_TYPES_BASES_ANY = 53,
|
|
116
|
+
RBS_TYPES_BASES_BOOL = 54,
|
|
117
|
+
RBS_TYPES_BASES_BOTTOM = 55,
|
|
118
|
+
RBS_TYPES_BASES_CLASS = 56,
|
|
119
|
+
RBS_TYPES_BASES_INSTANCE = 57,
|
|
120
|
+
RBS_TYPES_BASES_NIL = 58,
|
|
121
|
+
RBS_TYPES_BASES_SELF = 59,
|
|
122
|
+
RBS_TYPES_BASES_TOP = 60,
|
|
123
|
+
RBS_TYPES_BASES_VOID = 61,
|
|
124
|
+
RBS_TYPES_BLOCK = 62,
|
|
125
|
+
RBS_TYPES_CLASS_INSTANCE = 63,
|
|
126
|
+
RBS_TYPES_CLASS_SINGLETON = 64,
|
|
127
|
+
RBS_TYPES_FUNCTION = 65,
|
|
128
|
+
RBS_TYPES_FUNCTION_PARAM = 66,
|
|
129
|
+
RBS_TYPES_INTERFACE = 67,
|
|
130
|
+
RBS_TYPES_INTERSECTION = 68,
|
|
131
|
+
RBS_TYPES_LITERAL = 69,
|
|
132
|
+
RBS_TYPES_OPTIONAL = 70,
|
|
133
|
+
RBS_TYPES_PROC = 71,
|
|
134
|
+
RBS_TYPES_RECORD = 72,
|
|
135
|
+
RBS_TYPES_RECORD_FIELD_TYPE = 73,
|
|
136
|
+
RBS_TYPES_TUPLE = 74,
|
|
137
|
+
RBS_TYPES_UNION = 75,
|
|
138
|
+
RBS_TYPES_UNTYPED_FUNCTION = 76,
|
|
139
|
+
RBS_TYPES_VARIABLE = 77,
|
|
86
140
|
RBS_AST_SYMBOL,
|
|
87
141
|
};
|
|
88
142
|
|
|
89
143
|
typedef struct rbs_node {
|
|
90
144
|
enum rbs_node_type type;
|
|
91
|
-
|
|
145
|
+
rbs_location_range location;
|
|
92
146
|
} rbs_node_t;
|
|
93
147
|
|
|
94
|
-
const char *rbs_node_type_name(rbs_node_t *node);
|
|
148
|
+
const char *RBS_NONNULL rbs_node_type_name(rbs_node_t *RBS_NONNULL node);
|
|
95
149
|
|
|
96
150
|
/* rbs_node_list_node */
|
|
97
151
|
|
|
98
152
|
typedef struct rbs_node_list_node {
|
|
99
|
-
rbs_node_t *node;
|
|
100
|
-
struct rbs_node_list_node *next;
|
|
153
|
+
rbs_node_t *RBS_NONNULL node;
|
|
154
|
+
struct rbs_node_list_node *RBS_NULLABLE next;
|
|
101
155
|
} rbs_node_list_node_t;
|
|
102
156
|
|
|
103
157
|
typedef struct rbs_node_list {
|
|
104
|
-
rbs_allocator_t *allocator;
|
|
105
|
-
rbs_node_list_node_t *head;
|
|
106
|
-
rbs_node_list_node_t *tail;
|
|
158
|
+
rbs_allocator_t *RBS_NONNULL allocator;
|
|
159
|
+
rbs_node_list_node_t *RBS_NULLABLE head;
|
|
160
|
+
rbs_node_list_node_t *RBS_NULLABLE tail;
|
|
107
161
|
size_t length;
|
|
108
162
|
} rbs_node_list_t;
|
|
109
163
|
|
|
110
|
-
rbs_node_list_t *rbs_node_list_new(rbs_allocator_t *);
|
|
164
|
+
rbs_node_list_t *RBS_NONNULL rbs_node_list_new(rbs_allocator_t *RBS_NONNULL);
|
|
111
165
|
|
|
112
|
-
void rbs_node_list_append(rbs_node_list_t *list, rbs_node_t *node);
|
|
166
|
+
void rbs_node_list_append(rbs_node_list_t *RBS_NONNULL list, rbs_node_t *RBS_NONNULL node);
|
|
113
167
|
|
|
114
168
|
/* rbs_hash */
|
|
115
169
|
|
|
116
170
|
typedef struct rbs_hash_node {
|
|
117
|
-
rbs_node_t *key;
|
|
118
|
-
rbs_node_t *value;
|
|
119
|
-
struct rbs_hash_node *next;
|
|
171
|
+
rbs_node_t *RBS_NONNULL key;
|
|
172
|
+
rbs_node_t *RBS_NONNULL value;
|
|
173
|
+
struct rbs_hash_node *RBS_NULLABLE next;
|
|
120
174
|
} rbs_hash_node_t;
|
|
121
175
|
|
|
122
176
|
typedef struct rbs_hash {
|
|
123
|
-
rbs_allocator_t *allocator;
|
|
124
|
-
rbs_hash_node_t *head;
|
|
125
|
-
rbs_hash_node_t *tail;
|
|
177
|
+
rbs_allocator_t *RBS_NONNULL allocator;
|
|
178
|
+
rbs_hash_node_t *RBS_NULLABLE head;
|
|
179
|
+
rbs_hash_node_t *RBS_NULLABLE tail;
|
|
126
180
|
size_t length;
|
|
127
181
|
} rbs_hash_t;
|
|
128
182
|
|
|
129
|
-
rbs_hash_t *rbs_hash_new(rbs_allocator_t *);
|
|
183
|
+
rbs_hash_t *RBS_NONNULL rbs_hash_new(rbs_allocator_t *RBS_NONNULL);
|
|
130
184
|
|
|
131
|
-
void rbs_hash_set(rbs_hash_t *hash, rbs_node_t *key, rbs_node_t *value);
|
|
185
|
+
void rbs_hash_set(rbs_hash_t *RBS_NONNULL hash, rbs_node_t *RBS_NONNULL key, rbs_node_t *RBS_NONNULL value);
|
|
132
186
|
|
|
133
|
-
rbs_hash_node_t *rbs_hash_find(rbs_hash_t *hash, rbs_node_t *key);
|
|
187
|
+
rbs_hash_node_t *RBS_NULLABLE rbs_hash_find(rbs_hash_t *RBS_NONNULL hash, rbs_node_t *RBS_NONNULL key);
|
|
134
188
|
|
|
135
|
-
rbs_node_t *rbs_hash_get(rbs_hash_t *hash, rbs_node_t *key);
|
|
189
|
+
rbs_node_t *RBS_NULLABLE rbs_hash_get(rbs_hash_t *RBS_NONNULL hash, rbs_node_t *RBS_NONNULL key);
|
|
136
190
|
|
|
137
191
|
/* rbs_ast_node */
|
|
138
192
|
|
|
@@ -157,112 +211,166 @@ typedef struct rbs_ast_comment {
|
|
|
157
211
|
typedef struct rbs_ast_declarations_class {
|
|
158
212
|
rbs_node_t base;
|
|
159
213
|
|
|
160
|
-
struct rbs_type_name *name;
|
|
161
|
-
struct rbs_node_list *type_params;
|
|
162
|
-
struct rbs_ast_declarations_class_super *super_class;
|
|
163
|
-
struct rbs_node_list *members;
|
|
164
|
-
struct rbs_node_list *annotations;
|
|
165
|
-
struct rbs_ast_comment *comment;
|
|
214
|
+
struct rbs_type_name *RBS_NONNULL name;
|
|
215
|
+
struct rbs_node_list *RBS_NONNULL type_params;
|
|
216
|
+
struct rbs_ast_declarations_class_super *RBS_NULLABLE super_class;
|
|
217
|
+
struct rbs_node_list *RBS_NONNULL members;
|
|
218
|
+
struct rbs_node_list *RBS_NONNULL annotations;
|
|
219
|
+
struct rbs_ast_comment *RBS_NULLABLE comment;
|
|
220
|
+
|
|
221
|
+
rbs_location_range keyword_range; /* Required */
|
|
222
|
+
rbs_location_range name_range; /* Required */
|
|
223
|
+
rbs_location_range end_range; /* Required */
|
|
224
|
+
rbs_location_range type_params_range; /* Optional */
|
|
225
|
+
rbs_location_range lt_range; /* Optional */
|
|
166
226
|
} rbs_ast_declarations_class_t;
|
|
167
227
|
|
|
168
228
|
typedef struct rbs_ast_declarations_class_super {
|
|
169
229
|
rbs_node_t base;
|
|
170
230
|
|
|
171
|
-
struct rbs_type_name *name;
|
|
172
|
-
struct rbs_node_list *args;
|
|
231
|
+
struct rbs_type_name *RBS_NONNULL name;
|
|
232
|
+
struct rbs_node_list *RBS_NONNULL args;
|
|
233
|
+
|
|
234
|
+
rbs_location_range name_range; /* Required */
|
|
235
|
+
rbs_location_range args_range; /* Optional */
|
|
173
236
|
} rbs_ast_declarations_class_super_t;
|
|
174
237
|
|
|
175
238
|
typedef struct rbs_ast_declarations_class_alias {
|
|
176
239
|
rbs_node_t base;
|
|
177
240
|
|
|
178
|
-
struct rbs_type_name *new_name;
|
|
179
|
-
struct rbs_type_name *old_name;
|
|
180
|
-
struct rbs_ast_comment *comment;
|
|
181
|
-
struct rbs_node_list *annotations;
|
|
241
|
+
struct rbs_type_name *RBS_NONNULL new_name;
|
|
242
|
+
struct rbs_type_name *RBS_NONNULL old_name;
|
|
243
|
+
struct rbs_ast_comment *RBS_NULLABLE comment;
|
|
244
|
+
struct rbs_node_list *RBS_NONNULL annotations;
|
|
245
|
+
|
|
246
|
+
rbs_location_range keyword_range; /* Required */
|
|
247
|
+
rbs_location_range new_name_range; /* Required */
|
|
248
|
+
rbs_location_range eq_range; /* Required */
|
|
249
|
+
rbs_location_range old_name_range; /* Required */
|
|
182
250
|
} rbs_ast_declarations_class_alias_t;
|
|
183
251
|
|
|
184
252
|
typedef struct rbs_ast_declarations_constant {
|
|
185
253
|
rbs_node_t base;
|
|
186
254
|
|
|
187
|
-
struct rbs_type_name *name;
|
|
188
|
-
struct rbs_node *type;
|
|
189
|
-
struct rbs_ast_comment *comment;
|
|
190
|
-
struct rbs_node_list *annotations;
|
|
255
|
+
struct rbs_type_name *RBS_NONNULL name;
|
|
256
|
+
struct rbs_node *RBS_NONNULL type;
|
|
257
|
+
struct rbs_ast_comment *RBS_NULLABLE comment;
|
|
258
|
+
struct rbs_node_list *RBS_NONNULL annotations;
|
|
259
|
+
|
|
260
|
+
rbs_location_range name_range; /* Required */
|
|
261
|
+
rbs_location_range colon_range; /* Required */
|
|
191
262
|
} rbs_ast_declarations_constant_t;
|
|
192
263
|
|
|
193
264
|
typedef struct rbs_ast_declarations_global {
|
|
194
265
|
rbs_node_t base;
|
|
195
266
|
|
|
196
|
-
struct rbs_ast_symbol *name;
|
|
197
|
-
struct rbs_node *type;
|
|
198
|
-
struct rbs_ast_comment *comment;
|
|
199
|
-
struct rbs_node_list *annotations;
|
|
267
|
+
struct rbs_ast_symbol *RBS_NONNULL name;
|
|
268
|
+
struct rbs_node *RBS_NONNULL type;
|
|
269
|
+
struct rbs_ast_comment *RBS_NULLABLE comment;
|
|
270
|
+
struct rbs_node_list *RBS_NONNULL annotations;
|
|
271
|
+
|
|
272
|
+
rbs_location_range name_range; /* Required */
|
|
273
|
+
rbs_location_range colon_range; /* Required */
|
|
200
274
|
} rbs_ast_declarations_global_t;
|
|
201
275
|
|
|
202
276
|
typedef struct rbs_ast_declarations_interface {
|
|
203
277
|
rbs_node_t base;
|
|
204
278
|
|
|
205
|
-
struct rbs_type_name *name;
|
|
206
|
-
struct rbs_node_list *type_params;
|
|
207
|
-
struct rbs_node_list *members;
|
|
208
|
-
struct rbs_node_list *annotations;
|
|
209
|
-
struct rbs_ast_comment *comment;
|
|
279
|
+
struct rbs_type_name *RBS_NONNULL name;
|
|
280
|
+
struct rbs_node_list *RBS_NONNULL type_params;
|
|
281
|
+
struct rbs_node_list *RBS_NONNULL members;
|
|
282
|
+
struct rbs_node_list *RBS_NONNULL annotations;
|
|
283
|
+
struct rbs_ast_comment *RBS_NULLABLE comment;
|
|
284
|
+
|
|
285
|
+
rbs_location_range keyword_range; /* Required */
|
|
286
|
+
rbs_location_range name_range; /* Required */
|
|
287
|
+
rbs_location_range end_range; /* Required */
|
|
288
|
+
rbs_location_range type_params_range; /* Optional */
|
|
210
289
|
} rbs_ast_declarations_interface_t;
|
|
211
290
|
|
|
212
291
|
typedef struct rbs_ast_declarations_module {
|
|
213
292
|
rbs_node_t base;
|
|
214
293
|
|
|
215
|
-
struct rbs_type_name *name;
|
|
216
|
-
struct rbs_node_list *type_params;
|
|
217
|
-
struct rbs_node_list *self_types;
|
|
218
|
-
struct rbs_node_list *members;
|
|
219
|
-
struct rbs_node_list *annotations;
|
|
220
|
-
struct rbs_ast_comment *comment;
|
|
294
|
+
struct rbs_type_name *RBS_NONNULL name;
|
|
295
|
+
struct rbs_node_list *RBS_NONNULL type_params;
|
|
296
|
+
struct rbs_node_list *RBS_NONNULL self_types;
|
|
297
|
+
struct rbs_node_list *RBS_NONNULL members;
|
|
298
|
+
struct rbs_node_list *RBS_NONNULL annotations;
|
|
299
|
+
struct rbs_ast_comment *RBS_NULLABLE comment;
|
|
300
|
+
|
|
301
|
+
rbs_location_range keyword_range; /* Required */
|
|
302
|
+
rbs_location_range name_range; /* Required */
|
|
303
|
+
rbs_location_range end_range; /* Required */
|
|
304
|
+
rbs_location_range type_params_range; /* Optional */
|
|
305
|
+
rbs_location_range colon_range; /* Optional */
|
|
306
|
+
rbs_location_range self_types_range; /* Optional */
|
|
221
307
|
} rbs_ast_declarations_module_t;
|
|
222
308
|
|
|
223
309
|
typedef struct rbs_ast_declarations_module_self {
|
|
224
310
|
rbs_node_t base;
|
|
225
311
|
|
|
226
|
-
struct rbs_type_name *name;
|
|
227
|
-
struct rbs_node_list *args;
|
|
312
|
+
struct rbs_type_name *RBS_NONNULL name;
|
|
313
|
+
struct rbs_node_list *RBS_NONNULL args;
|
|
314
|
+
|
|
315
|
+
rbs_location_range name_range; /* Required */
|
|
316
|
+
rbs_location_range args_range; /* Optional */
|
|
228
317
|
} rbs_ast_declarations_module_self_t;
|
|
229
318
|
|
|
230
319
|
typedef struct rbs_ast_declarations_module_alias {
|
|
231
320
|
rbs_node_t base;
|
|
232
321
|
|
|
233
|
-
struct rbs_type_name *new_name;
|
|
234
|
-
struct rbs_type_name *old_name;
|
|
235
|
-
struct rbs_ast_comment *comment;
|
|
236
|
-
struct rbs_node_list *annotations;
|
|
322
|
+
struct rbs_type_name *RBS_NONNULL new_name;
|
|
323
|
+
struct rbs_type_name *RBS_NONNULL old_name;
|
|
324
|
+
struct rbs_ast_comment *RBS_NULLABLE comment;
|
|
325
|
+
struct rbs_node_list *RBS_NONNULL annotations;
|
|
326
|
+
|
|
327
|
+
rbs_location_range keyword_range; /* Required */
|
|
328
|
+
rbs_location_range new_name_range; /* Required */
|
|
329
|
+
rbs_location_range eq_range; /* Required */
|
|
330
|
+
rbs_location_range old_name_range; /* Required */
|
|
237
331
|
} rbs_ast_declarations_module_alias_t;
|
|
238
332
|
|
|
239
333
|
typedef struct rbs_ast_declarations_type_alias {
|
|
240
334
|
rbs_node_t base;
|
|
241
335
|
|
|
242
|
-
struct rbs_type_name *name;
|
|
243
|
-
struct rbs_node_list *type_params;
|
|
244
|
-
struct rbs_node *type;
|
|
245
|
-
struct rbs_node_list *annotations;
|
|
246
|
-
struct rbs_ast_comment *comment;
|
|
336
|
+
struct rbs_type_name *RBS_NONNULL name;
|
|
337
|
+
struct rbs_node_list *RBS_NONNULL type_params;
|
|
338
|
+
struct rbs_node *RBS_NONNULL type;
|
|
339
|
+
struct rbs_node_list *RBS_NONNULL annotations;
|
|
340
|
+
struct rbs_ast_comment *RBS_NULLABLE comment;
|
|
341
|
+
|
|
342
|
+
rbs_location_range keyword_range; /* Required */
|
|
343
|
+
rbs_location_range name_range; /* Required */
|
|
344
|
+
rbs_location_range eq_range; /* Required */
|
|
345
|
+
rbs_location_range type_params_range; /* Optional */
|
|
247
346
|
} rbs_ast_declarations_type_alias_t;
|
|
248
347
|
|
|
249
348
|
typedef struct rbs_ast_directives_use {
|
|
250
349
|
rbs_node_t base;
|
|
251
350
|
|
|
252
|
-
struct rbs_node_list *clauses;
|
|
351
|
+
struct rbs_node_list *RBS_NONNULL clauses;
|
|
352
|
+
|
|
353
|
+
rbs_location_range keyword_range; /* Required */
|
|
253
354
|
} rbs_ast_directives_use_t;
|
|
254
355
|
|
|
255
356
|
typedef struct rbs_ast_directives_use_single_clause {
|
|
256
357
|
rbs_node_t base;
|
|
257
358
|
|
|
258
|
-
struct rbs_type_name *type_name;
|
|
259
|
-
struct rbs_ast_symbol *new_name;
|
|
359
|
+
struct rbs_type_name *RBS_NONNULL type_name;
|
|
360
|
+
struct rbs_ast_symbol *RBS_NULLABLE new_name;
|
|
361
|
+
|
|
362
|
+
rbs_location_range type_name_range; /* Required */
|
|
363
|
+
rbs_location_range keyword_range; /* Optional */
|
|
364
|
+
rbs_location_range new_name_range; /* Optional */
|
|
260
365
|
} rbs_ast_directives_use_single_clause_t;
|
|
261
366
|
|
|
262
367
|
typedef struct rbs_ast_directives_use_wildcard_clause {
|
|
263
368
|
rbs_node_t base;
|
|
264
369
|
|
|
265
|
-
struct rbs_namespace *rbs_namespace;
|
|
370
|
+
struct rbs_namespace *RBS_NONNULL rbs_namespace;
|
|
371
|
+
|
|
372
|
+
rbs_location_range namespace_range; /* Required */
|
|
373
|
+
rbs_location_range star_range; /* Required */
|
|
266
374
|
} rbs_ast_directives_use_wildcard_clause_t;
|
|
267
375
|
|
|
268
376
|
typedef struct rbs_ast_integer {
|
|
@@ -274,117 +382,177 @@ typedef struct rbs_ast_integer {
|
|
|
274
382
|
typedef struct rbs_ast_members_alias {
|
|
275
383
|
rbs_node_t base;
|
|
276
384
|
|
|
277
|
-
struct rbs_ast_symbol *new_name;
|
|
278
|
-
struct rbs_ast_symbol *old_name;
|
|
279
|
-
|
|
280
|
-
struct rbs_node_list *annotations;
|
|
281
|
-
struct rbs_ast_comment *comment;
|
|
385
|
+
struct rbs_ast_symbol *RBS_NONNULL new_name;
|
|
386
|
+
struct rbs_ast_symbol *RBS_NONNULL old_name;
|
|
387
|
+
enum rbs_alias_kind kind;
|
|
388
|
+
struct rbs_node_list *RBS_NONNULL annotations;
|
|
389
|
+
struct rbs_ast_comment *RBS_NULLABLE comment;
|
|
390
|
+
|
|
391
|
+
rbs_location_range keyword_range; /* Required */
|
|
392
|
+
rbs_location_range new_name_range; /* Required */
|
|
393
|
+
rbs_location_range old_name_range; /* Required */
|
|
394
|
+
rbs_location_range new_kind_range; /* Optional */
|
|
395
|
+
rbs_location_range old_kind_range; /* Optional */
|
|
282
396
|
} rbs_ast_members_alias_t;
|
|
283
397
|
|
|
284
398
|
typedef struct rbs_ast_members_attr_accessor {
|
|
285
399
|
rbs_node_t base;
|
|
286
400
|
|
|
287
|
-
struct rbs_ast_symbol *name;
|
|
288
|
-
struct rbs_node *type;
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
struct rbs_node_list *annotations;
|
|
292
|
-
struct rbs_ast_comment *comment;
|
|
293
|
-
|
|
401
|
+
struct rbs_ast_symbol *RBS_NONNULL name;
|
|
402
|
+
struct rbs_node *RBS_NONNULL type;
|
|
403
|
+
rbs_attr_ivar_name_t ivar_name;
|
|
404
|
+
enum rbs_attribute_kind kind;
|
|
405
|
+
struct rbs_node_list *RBS_NONNULL annotations;
|
|
406
|
+
struct rbs_ast_comment *RBS_NULLABLE comment;
|
|
407
|
+
enum rbs_attribute_visibility visibility;
|
|
408
|
+
|
|
409
|
+
rbs_location_range keyword_range; /* Required */
|
|
410
|
+
rbs_location_range name_range; /* Required */
|
|
411
|
+
rbs_location_range colon_range; /* Required */
|
|
412
|
+
rbs_location_range kind_range; /* Optional */
|
|
413
|
+
rbs_location_range ivar_range; /* Optional */
|
|
414
|
+
rbs_location_range ivar_name_range; /* Optional */
|
|
415
|
+
rbs_location_range visibility_range; /* Optional */
|
|
294
416
|
} rbs_ast_members_attr_accessor_t;
|
|
295
417
|
|
|
296
418
|
typedef struct rbs_ast_members_attr_reader {
|
|
297
419
|
rbs_node_t base;
|
|
298
420
|
|
|
299
|
-
struct rbs_ast_symbol *name;
|
|
300
|
-
struct rbs_node *type;
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
struct rbs_node_list *annotations;
|
|
304
|
-
struct rbs_ast_comment *comment;
|
|
305
|
-
|
|
421
|
+
struct rbs_ast_symbol *RBS_NONNULL name;
|
|
422
|
+
struct rbs_node *RBS_NONNULL type;
|
|
423
|
+
rbs_attr_ivar_name_t ivar_name;
|
|
424
|
+
enum rbs_attribute_kind kind;
|
|
425
|
+
struct rbs_node_list *RBS_NONNULL annotations;
|
|
426
|
+
struct rbs_ast_comment *RBS_NULLABLE comment;
|
|
427
|
+
enum rbs_attribute_visibility visibility;
|
|
428
|
+
|
|
429
|
+
rbs_location_range keyword_range; /* Required */
|
|
430
|
+
rbs_location_range name_range; /* Required */
|
|
431
|
+
rbs_location_range colon_range; /* Required */
|
|
432
|
+
rbs_location_range kind_range; /* Optional */
|
|
433
|
+
rbs_location_range ivar_range; /* Optional */
|
|
434
|
+
rbs_location_range ivar_name_range; /* Optional */
|
|
435
|
+
rbs_location_range visibility_range; /* Optional */
|
|
306
436
|
} rbs_ast_members_attr_reader_t;
|
|
307
437
|
|
|
308
438
|
typedef struct rbs_ast_members_attr_writer {
|
|
309
439
|
rbs_node_t base;
|
|
310
440
|
|
|
311
|
-
struct rbs_ast_symbol *name;
|
|
312
|
-
struct rbs_node *type;
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
struct rbs_node_list *annotations;
|
|
316
|
-
struct rbs_ast_comment *comment;
|
|
317
|
-
|
|
441
|
+
struct rbs_ast_symbol *RBS_NONNULL name;
|
|
442
|
+
struct rbs_node *RBS_NONNULL type;
|
|
443
|
+
rbs_attr_ivar_name_t ivar_name;
|
|
444
|
+
enum rbs_attribute_kind kind;
|
|
445
|
+
struct rbs_node_list *RBS_NONNULL annotations;
|
|
446
|
+
struct rbs_ast_comment *RBS_NULLABLE comment;
|
|
447
|
+
enum rbs_attribute_visibility visibility;
|
|
448
|
+
|
|
449
|
+
rbs_location_range keyword_range; /* Required */
|
|
450
|
+
rbs_location_range name_range; /* Required */
|
|
451
|
+
rbs_location_range colon_range; /* Required */
|
|
452
|
+
rbs_location_range kind_range; /* Optional */
|
|
453
|
+
rbs_location_range ivar_range; /* Optional */
|
|
454
|
+
rbs_location_range ivar_name_range; /* Optional */
|
|
455
|
+
rbs_location_range visibility_range; /* Optional */
|
|
318
456
|
} rbs_ast_members_attr_writer_t;
|
|
319
457
|
|
|
320
458
|
typedef struct rbs_ast_members_class_instance_variable {
|
|
321
459
|
rbs_node_t base;
|
|
322
460
|
|
|
323
|
-
struct rbs_ast_symbol *name;
|
|
324
|
-
struct rbs_node *type;
|
|
325
|
-
struct rbs_ast_comment *comment;
|
|
461
|
+
struct rbs_ast_symbol *RBS_NONNULL name;
|
|
462
|
+
struct rbs_node *RBS_NONNULL type;
|
|
463
|
+
struct rbs_ast_comment *RBS_NULLABLE comment;
|
|
464
|
+
|
|
465
|
+
rbs_location_range name_range; /* Required */
|
|
466
|
+
rbs_location_range colon_range; /* Required */
|
|
467
|
+
rbs_location_range kind_range; /* Optional */
|
|
326
468
|
} rbs_ast_members_class_instance_variable_t;
|
|
327
469
|
|
|
328
470
|
typedef struct rbs_ast_members_class_variable {
|
|
329
471
|
rbs_node_t base;
|
|
330
472
|
|
|
331
|
-
struct rbs_ast_symbol *name;
|
|
332
|
-
struct rbs_node *type;
|
|
333
|
-
struct rbs_ast_comment *comment;
|
|
473
|
+
struct rbs_ast_symbol *RBS_NONNULL name;
|
|
474
|
+
struct rbs_node *RBS_NONNULL type;
|
|
475
|
+
struct rbs_ast_comment *RBS_NULLABLE comment;
|
|
476
|
+
|
|
477
|
+
rbs_location_range name_range; /* Required */
|
|
478
|
+
rbs_location_range colon_range; /* Required */
|
|
479
|
+
rbs_location_range kind_range; /* Optional */
|
|
334
480
|
} rbs_ast_members_class_variable_t;
|
|
335
481
|
|
|
336
482
|
typedef struct rbs_ast_members_extend {
|
|
337
483
|
rbs_node_t base;
|
|
338
484
|
|
|
339
|
-
struct rbs_type_name *name;
|
|
340
|
-
struct rbs_node_list *args;
|
|
341
|
-
struct rbs_node_list *annotations;
|
|
342
|
-
struct rbs_ast_comment *comment;
|
|
485
|
+
struct rbs_type_name *RBS_NONNULL name;
|
|
486
|
+
struct rbs_node_list *RBS_NONNULL args;
|
|
487
|
+
struct rbs_node_list *RBS_NONNULL annotations;
|
|
488
|
+
struct rbs_ast_comment *RBS_NULLABLE comment;
|
|
489
|
+
|
|
490
|
+
rbs_location_range name_range; /* Required */
|
|
491
|
+
rbs_location_range keyword_range; /* Required */
|
|
492
|
+
rbs_location_range args_range; /* Optional */
|
|
343
493
|
} rbs_ast_members_extend_t;
|
|
344
494
|
|
|
345
495
|
typedef struct rbs_ast_members_include {
|
|
346
496
|
rbs_node_t base;
|
|
347
497
|
|
|
348
|
-
struct rbs_type_name *name;
|
|
349
|
-
struct rbs_node_list *args;
|
|
350
|
-
struct rbs_node_list *annotations;
|
|
351
|
-
struct rbs_ast_comment *comment;
|
|
498
|
+
struct rbs_type_name *RBS_NONNULL name;
|
|
499
|
+
struct rbs_node_list *RBS_NONNULL args;
|
|
500
|
+
struct rbs_node_list *RBS_NONNULL annotations;
|
|
501
|
+
struct rbs_ast_comment *RBS_NULLABLE comment;
|
|
502
|
+
|
|
503
|
+
rbs_location_range name_range; /* Required */
|
|
504
|
+
rbs_location_range keyword_range; /* Required */
|
|
505
|
+
rbs_location_range args_range; /* Optional */
|
|
352
506
|
} rbs_ast_members_include_t;
|
|
353
507
|
|
|
354
508
|
typedef struct rbs_ast_members_instance_variable {
|
|
355
509
|
rbs_node_t base;
|
|
356
510
|
|
|
357
|
-
struct rbs_ast_symbol *name;
|
|
358
|
-
struct rbs_node *type;
|
|
359
|
-
struct rbs_ast_comment *comment;
|
|
511
|
+
struct rbs_ast_symbol *RBS_NONNULL name;
|
|
512
|
+
struct rbs_node *RBS_NONNULL type;
|
|
513
|
+
struct rbs_ast_comment *RBS_NULLABLE comment;
|
|
514
|
+
|
|
515
|
+
rbs_location_range name_range; /* Required */
|
|
516
|
+
rbs_location_range colon_range; /* Required */
|
|
517
|
+
rbs_location_range kind_range; /* Optional */
|
|
360
518
|
} rbs_ast_members_instance_variable_t;
|
|
361
519
|
|
|
362
520
|
typedef struct rbs_ast_members_method_definition {
|
|
363
521
|
rbs_node_t base;
|
|
364
522
|
|
|
365
|
-
struct rbs_ast_symbol *name;
|
|
366
|
-
|
|
367
|
-
struct rbs_node_list *overloads;
|
|
368
|
-
struct rbs_node_list *annotations;
|
|
369
|
-
struct rbs_ast_comment *comment;
|
|
523
|
+
struct rbs_ast_symbol *RBS_NONNULL name;
|
|
524
|
+
enum rbs_method_definition_kind kind;
|
|
525
|
+
struct rbs_node_list *RBS_NONNULL overloads;
|
|
526
|
+
struct rbs_node_list *RBS_NONNULL annotations;
|
|
527
|
+
struct rbs_ast_comment *RBS_NULLABLE comment;
|
|
370
528
|
bool overloading;
|
|
371
|
-
|
|
529
|
+
enum rbs_method_definition_visibility visibility;
|
|
530
|
+
|
|
531
|
+
rbs_location_range keyword_range; /* Required */
|
|
532
|
+
rbs_location_range name_range; /* Required */
|
|
533
|
+
rbs_location_range kind_range; /* Optional */
|
|
534
|
+
rbs_location_range overloading_range; /* Optional */
|
|
535
|
+
rbs_location_range visibility_range; /* Optional */
|
|
372
536
|
} rbs_ast_members_method_definition_t;
|
|
373
537
|
|
|
374
538
|
typedef struct rbs_ast_members_method_definition_overload {
|
|
375
539
|
rbs_node_t base;
|
|
376
540
|
|
|
377
|
-
struct rbs_node_list *annotations;
|
|
378
|
-
struct rbs_node *method_type;
|
|
541
|
+
struct rbs_node_list *RBS_NONNULL annotations;
|
|
542
|
+
struct rbs_node *RBS_NONNULL method_type;
|
|
379
543
|
} rbs_ast_members_method_definition_overload_t;
|
|
380
544
|
|
|
381
545
|
typedef struct rbs_ast_members_prepend {
|
|
382
546
|
rbs_node_t base;
|
|
383
547
|
|
|
384
|
-
struct rbs_type_name *name;
|
|
385
|
-
struct rbs_node_list *args;
|
|
386
|
-
struct rbs_node_list *annotations;
|
|
387
|
-
struct rbs_ast_comment *comment;
|
|
548
|
+
struct rbs_type_name *RBS_NONNULL name;
|
|
549
|
+
struct rbs_node_list *RBS_NONNULL args;
|
|
550
|
+
struct rbs_node_list *RBS_NONNULL annotations;
|
|
551
|
+
struct rbs_ast_comment *RBS_NULLABLE comment;
|
|
552
|
+
|
|
553
|
+
rbs_location_range name_range; /* Required */
|
|
554
|
+
rbs_location_range keyword_range; /* Required */
|
|
555
|
+
rbs_location_range args_range; /* Optional */
|
|
388
556
|
} rbs_ast_members_prepend_t;
|
|
389
557
|
|
|
390
558
|
typedef struct rbs_ast_members_private {
|
|
@@ -397,47 +565,145 @@ typedef struct rbs_ast_members_public {
|
|
|
397
565
|
|
|
398
566
|
} rbs_ast_members_public_t;
|
|
399
567
|
|
|
568
|
+
typedef struct rbs_ast_ruby_annotations_block_param_type_annotation {
|
|
569
|
+
rbs_node_t base;
|
|
570
|
+
|
|
571
|
+
rbs_location_range prefix_location;
|
|
572
|
+
rbs_location_range ampersand_location;
|
|
573
|
+
rbs_location_range name_location;
|
|
574
|
+
rbs_location_range colon_location;
|
|
575
|
+
rbs_location_range question_location;
|
|
576
|
+
rbs_location_range type_location;
|
|
577
|
+
struct rbs_node *RBS_NONNULL type_;
|
|
578
|
+
rbs_location_range comment_location;
|
|
579
|
+
} rbs_ast_ruby_annotations_block_param_type_annotation_t;
|
|
580
|
+
|
|
581
|
+
typedef struct rbs_ast_ruby_annotations_class_alias_annotation {
|
|
582
|
+
rbs_node_t base;
|
|
583
|
+
|
|
584
|
+
rbs_location_range prefix_location;
|
|
585
|
+
rbs_location_range keyword_location;
|
|
586
|
+
struct rbs_type_name *RBS_NONNULL type_name;
|
|
587
|
+
rbs_location_range type_name_location;
|
|
588
|
+
} rbs_ast_ruby_annotations_class_alias_annotation_t;
|
|
589
|
+
|
|
400
590
|
typedef struct rbs_ast_ruby_annotations_colon_method_type_annotation {
|
|
401
591
|
rbs_node_t base;
|
|
402
592
|
|
|
403
|
-
|
|
404
|
-
struct rbs_node_list *annotations;
|
|
405
|
-
struct rbs_node *method_type;
|
|
593
|
+
rbs_location_range prefix_location;
|
|
594
|
+
struct rbs_node_list *RBS_NONNULL annotations;
|
|
595
|
+
struct rbs_node *RBS_NONNULL method_type;
|
|
406
596
|
} rbs_ast_ruby_annotations_colon_method_type_annotation_t;
|
|
407
597
|
|
|
598
|
+
typedef struct rbs_ast_ruby_annotations_double_splat_param_type_annotation {
|
|
599
|
+
rbs_node_t base;
|
|
600
|
+
|
|
601
|
+
rbs_location_range prefix_location;
|
|
602
|
+
rbs_location_range star2_location;
|
|
603
|
+
rbs_location_range name_location;
|
|
604
|
+
rbs_location_range colon_location;
|
|
605
|
+
struct rbs_node *RBS_NONNULL param_type;
|
|
606
|
+
rbs_location_range comment_location;
|
|
607
|
+
} rbs_ast_ruby_annotations_double_splat_param_type_annotation_t;
|
|
608
|
+
|
|
609
|
+
typedef struct rbs_ast_ruby_annotations_instance_variable_annotation {
|
|
610
|
+
rbs_node_t base;
|
|
611
|
+
|
|
612
|
+
rbs_location_range prefix_location;
|
|
613
|
+
struct rbs_ast_symbol *RBS_NONNULL ivar_name;
|
|
614
|
+
rbs_location_range ivar_name_location;
|
|
615
|
+
rbs_location_range colon_location;
|
|
616
|
+
struct rbs_node *RBS_NONNULL type;
|
|
617
|
+
rbs_location_range comment_location;
|
|
618
|
+
} rbs_ast_ruby_annotations_instance_variable_annotation_t;
|
|
619
|
+
|
|
408
620
|
typedef struct rbs_ast_ruby_annotations_method_types_annotation {
|
|
409
621
|
rbs_node_t base;
|
|
410
622
|
|
|
411
|
-
|
|
412
|
-
struct rbs_node_list *overloads;
|
|
413
|
-
|
|
623
|
+
rbs_location_range prefix_location;
|
|
624
|
+
struct rbs_node_list *RBS_NONNULL overloads;
|
|
625
|
+
rbs_location_range_list_t *RBS_NONNULL vertical_bar_locations;
|
|
626
|
+
rbs_location_range dot3_location;
|
|
414
627
|
} rbs_ast_ruby_annotations_method_types_annotation_t;
|
|
415
628
|
|
|
629
|
+
typedef struct rbs_ast_ruby_annotations_module_alias_annotation {
|
|
630
|
+
rbs_node_t base;
|
|
631
|
+
|
|
632
|
+
rbs_location_range prefix_location;
|
|
633
|
+
rbs_location_range keyword_location;
|
|
634
|
+
struct rbs_type_name *RBS_NONNULL type_name;
|
|
635
|
+
rbs_location_range type_name_location;
|
|
636
|
+
} rbs_ast_ruby_annotations_module_alias_annotation_t;
|
|
637
|
+
|
|
638
|
+
typedef struct rbs_ast_ruby_annotations_module_self_annotation {
|
|
639
|
+
rbs_node_t base;
|
|
640
|
+
|
|
641
|
+
rbs_location_range prefix_location;
|
|
642
|
+
rbs_location_range keyword_location;
|
|
643
|
+
rbs_location_range colon_location;
|
|
644
|
+
struct rbs_type_name *RBS_NONNULL name;
|
|
645
|
+
struct rbs_node_list *RBS_NONNULL args;
|
|
646
|
+
rbs_location_range open_bracket_location;
|
|
647
|
+
rbs_location_range close_bracket_location;
|
|
648
|
+
rbs_location_range_list_t *RBS_NONNULL args_comma_locations;
|
|
649
|
+
rbs_location_range comment_location;
|
|
650
|
+
} rbs_ast_ruby_annotations_module_self_annotation_t;
|
|
651
|
+
|
|
416
652
|
typedef struct rbs_ast_ruby_annotations_node_type_assertion {
|
|
417
653
|
rbs_node_t base;
|
|
418
654
|
|
|
419
|
-
|
|
420
|
-
struct rbs_node *type;
|
|
655
|
+
rbs_location_range prefix_location;
|
|
656
|
+
struct rbs_node *RBS_NONNULL type;
|
|
421
657
|
} rbs_ast_ruby_annotations_node_type_assertion_t;
|
|
422
658
|
|
|
659
|
+
typedef struct rbs_ast_ruby_annotations_param_type_annotation {
|
|
660
|
+
rbs_node_t base;
|
|
661
|
+
|
|
662
|
+
rbs_location_range prefix_location;
|
|
663
|
+
rbs_location_range name_location;
|
|
664
|
+
rbs_location_range colon_location;
|
|
665
|
+
struct rbs_node *RBS_NONNULL param_type;
|
|
666
|
+
rbs_location_range comment_location;
|
|
667
|
+
} rbs_ast_ruby_annotations_param_type_annotation_t;
|
|
668
|
+
|
|
423
669
|
typedef struct rbs_ast_ruby_annotations_return_type_annotation {
|
|
424
670
|
rbs_node_t base;
|
|
425
671
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
struct rbs_node *return_type;
|
|
430
|
-
|
|
672
|
+
rbs_location_range prefix_location;
|
|
673
|
+
rbs_location_range return_location;
|
|
674
|
+
rbs_location_range colon_location;
|
|
675
|
+
struct rbs_node *RBS_NONNULL return_type;
|
|
676
|
+
rbs_location_range comment_location;
|
|
431
677
|
} rbs_ast_ruby_annotations_return_type_annotation_t;
|
|
432
678
|
|
|
433
679
|
typedef struct rbs_ast_ruby_annotations_skip_annotation {
|
|
434
680
|
rbs_node_t base;
|
|
435
681
|
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
682
|
+
rbs_location_range prefix_location;
|
|
683
|
+
rbs_location_range skip_location;
|
|
684
|
+
rbs_location_range comment_location;
|
|
439
685
|
} rbs_ast_ruby_annotations_skip_annotation_t;
|
|
440
686
|
|
|
687
|
+
typedef struct rbs_ast_ruby_annotations_splat_param_type_annotation {
|
|
688
|
+
rbs_node_t base;
|
|
689
|
+
|
|
690
|
+
rbs_location_range prefix_location;
|
|
691
|
+
rbs_location_range star_location;
|
|
692
|
+
rbs_location_range name_location;
|
|
693
|
+
rbs_location_range colon_location;
|
|
694
|
+
struct rbs_node *RBS_NONNULL param_type;
|
|
695
|
+
rbs_location_range comment_location;
|
|
696
|
+
} rbs_ast_ruby_annotations_splat_param_type_annotation_t;
|
|
697
|
+
|
|
698
|
+
typedef struct rbs_ast_ruby_annotations_type_application_annotation {
|
|
699
|
+
rbs_node_t base;
|
|
700
|
+
|
|
701
|
+
rbs_location_range prefix_location;
|
|
702
|
+
struct rbs_node_list *RBS_NONNULL type_args;
|
|
703
|
+
rbs_location_range close_bracket_location;
|
|
704
|
+
rbs_location_range_list_t *RBS_NONNULL comma_locations;
|
|
705
|
+
} rbs_ast_ruby_annotations_type_application_annotation_t;
|
|
706
|
+
|
|
441
707
|
typedef struct rbs_ast_string {
|
|
442
708
|
rbs_node_t base;
|
|
443
709
|
|
|
@@ -447,47 +713,61 @@ typedef struct rbs_ast_string {
|
|
|
447
713
|
typedef struct rbs_ast_type_param {
|
|
448
714
|
rbs_node_t base;
|
|
449
715
|
|
|
450
|
-
struct rbs_ast_symbol *name;
|
|
451
|
-
|
|
452
|
-
struct rbs_node *upper_bound;
|
|
453
|
-
struct rbs_node *
|
|
716
|
+
struct rbs_ast_symbol *RBS_NONNULL name;
|
|
717
|
+
enum rbs_type_param_variance variance;
|
|
718
|
+
struct rbs_node *RBS_NULLABLE upper_bound;
|
|
719
|
+
struct rbs_node *RBS_NULLABLE lower_bound;
|
|
720
|
+
struct rbs_node *RBS_NULLABLE default_type;
|
|
454
721
|
bool unchecked;
|
|
722
|
+
|
|
723
|
+
rbs_location_range name_range; /* Required */
|
|
724
|
+
rbs_location_range variance_range; /* Optional */
|
|
725
|
+
rbs_location_range unchecked_range; /* Optional */
|
|
726
|
+
rbs_location_range upper_bound_range; /* Optional */
|
|
727
|
+
rbs_location_range lower_bound_range; /* Optional */
|
|
728
|
+
rbs_location_range default_range; /* Optional */
|
|
455
729
|
} rbs_ast_type_param_t;
|
|
456
730
|
|
|
457
731
|
typedef struct rbs_method_type {
|
|
458
732
|
rbs_node_t base;
|
|
459
733
|
|
|
460
|
-
struct rbs_node_list *type_params;
|
|
461
|
-
struct rbs_node *type;
|
|
462
|
-
struct rbs_types_block *block;
|
|
734
|
+
struct rbs_node_list *RBS_NONNULL type_params;
|
|
735
|
+
struct rbs_node *RBS_NONNULL type;
|
|
736
|
+
struct rbs_types_block *RBS_NULLABLE block;
|
|
737
|
+
|
|
738
|
+
rbs_location_range type_range; /* Required */
|
|
739
|
+
rbs_location_range type_params_range; /* Optional */
|
|
463
740
|
} rbs_method_type_t;
|
|
464
741
|
|
|
465
742
|
typedef struct rbs_namespace {
|
|
466
743
|
rbs_node_t base;
|
|
467
744
|
|
|
468
|
-
struct rbs_node_list *path;
|
|
745
|
+
struct rbs_node_list *RBS_NONNULL path;
|
|
469
746
|
bool absolute;
|
|
470
747
|
} rbs_namespace_t;
|
|
471
748
|
|
|
472
749
|
typedef struct rbs_signature {
|
|
473
750
|
rbs_node_t base;
|
|
474
751
|
|
|
475
|
-
struct rbs_node_list *directives;
|
|
476
|
-
struct rbs_node_list *declarations;
|
|
752
|
+
struct rbs_node_list *RBS_NONNULL directives;
|
|
753
|
+
struct rbs_node_list *RBS_NONNULL declarations;
|
|
477
754
|
} rbs_signature_t;
|
|
478
755
|
|
|
479
756
|
typedef struct rbs_type_name {
|
|
480
757
|
rbs_node_t base;
|
|
481
758
|
|
|
482
|
-
struct rbs_namespace *rbs_namespace;
|
|
483
|
-
struct rbs_ast_symbol *name;
|
|
759
|
+
struct rbs_namespace *RBS_NONNULL rbs_namespace;
|
|
760
|
+
struct rbs_ast_symbol *RBS_NONNULL name;
|
|
484
761
|
} rbs_type_name_t;
|
|
485
762
|
|
|
486
763
|
typedef struct rbs_types_alias {
|
|
487
764
|
rbs_node_t base;
|
|
488
765
|
|
|
489
|
-
struct rbs_type_name *name;
|
|
490
|
-
struct rbs_node_list *args;
|
|
766
|
+
struct rbs_type_name *RBS_NONNULL name;
|
|
767
|
+
struct rbs_node_list *RBS_NONNULL args;
|
|
768
|
+
|
|
769
|
+
rbs_location_range name_range; /* Required */
|
|
770
|
+
rbs_location_range args_range; /* Optional */
|
|
491
771
|
} rbs_types_alias_t;
|
|
492
772
|
|
|
493
773
|
typedef struct rbs_types_bases_any {
|
|
@@ -539,133 +819,144 @@ typedef struct rbs_types_bases_void {
|
|
|
539
819
|
typedef struct rbs_types_block {
|
|
540
820
|
rbs_node_t base;
|
|
541
821
|
|
|
542
|
-
struct rbs_node *type;
|
|
822
|
+
struct rbs_node *RBS_NONNULL type;
|
|
543
823
|
bool required;
|
|
544
|
-
struct rbs_node *self_type;
|
|
824
|
+
struct rbs_node *RBS_NULLABLE self_type;
|
|
545
825
|
} rbs_types_block_t;
|
|
546
826
|
|
|
547
827
|
typedef struct rbs_types_class_instance {
|
|
548
828
|
rbs_node_t base;
|
|
549
829
|
|
|
550
|
-
struct rbs_type_name *name;
|
|
551
|
-
struct rbs_node_list *args;
|
|
830
|
+
struct rbs_type_name *RBS_NONNULL name;
|
|
831
|
+
struct rbs_node_list *RBS_NONNULL args;
|
|
832
|
+
|
|
833
|
+
rbs_location_range name_range; /* Required */
|
|
834
|
+
rbs_location_range args_range; /* Optional */
|
|
552
835
|
} rbs_types_class_instance_t;
|
|
553
836
|
|
|
554
837
|
typedef struct rbs_types_class_singleton {
|
|
555
838
|
rbs_node_t base;
|
|
556
839
|
|
|
557
|
-
struct rbs_type_name *name;
|
|
840
|
+
struct rbs_type_name *RBS_NONNULL name;
|
|
841
|
+
struct rbs_node_list *RBS_NONNULL args;
|
|
842
|
+
|
|
843
|
+
rbs_location_range name_range; /* Required */
|
|
844
|
+
rbs_location_range args_range; /* Optional */
|
|
558
845
|
} rbs_types_class_singleton_t;
|
|
559
846
|
|
|
560
847
|
typedef struct rbs_types_function {
|
|
561
848
|
rbs_node_t base;
|
|
562
849
|
|
|
563
|
-
struct rbs_node_list *required_positionals;
|
|
564
|
-
struct rbs_node_list *optional_positionals;
|
|
565
|
-
struct rbs_node *rest_positionals;
|
|
566
|
-
struct rbs_node_list *trailing_positionals;
|
|
567
|
-
struct rbs_hash *required_keywords;
|
|
568
|
-
struct rbs_hash *optional_keywords;
|
|
569
|
-
struct rbs_node *rest_keywords;
|
|
570
|
-
struct rbs_node *return_type;
|
|
850
|
+
struct rbs_node_list *RBS_NONNULL required_positionals;
|
|
851
|
+
struct rbs_node_list *RBS_NONNULL optional_positionals;
|
|
852
|
+
struct rbs_node *RBS_NULLABLE rest_positionals;
|
|
853
|
+
struct rbs_node_list *RBS_NONNULL trailing_positionals;
|
|
854
|
+
struct rbs_hash *RBS_NONNULL required_keywords;
|
|
855
|
+
struct rbs_hash *RBS_NONNULL optional_keywords;
|
|
856
|
+
struct rbs_node *RBS_NULLABLE rest_keywords;
|
|
857
|
+
struct rbs_node *RBS_NONNULL return_type;
|
|
571
858
|
} rbs_types_function_t;
|
|
572
859
|
|
|
573
860
|
typedef struct rbs_types_function_param {
|
|
574
861
|
rbs_node_t base;
|
|
575
862
|
|
|
576
|
-
struct rbs_node *type;
|
|
577
|
-
struct rbs_ast_symbol *name;
|
|
863
|
+
struct rbs_node *RBS_NONNULL type;
|
|
864
|
+
struct rbs_ast_symbol *RBS_NULLABLE name;
|
|
865
|
+
|
|
866
|
+
rbs_location_range name_range; /* Optional */
|
|
578
867
|
} rbs_types_function_param_t;
|
|
579
868
|
|
|
580
869
|
typedef struct rbs_types_interface {
|
|
581
870
|
rbs_node_t base;
|
|
582
871
|
|
|
583
|
-
struct rbs_type_name *name;
|
|
584
|
-
struct rbs_node_list *args;
|
|
872
|
+
struct rbs_type_name *RBS_NONNULL name;
|
|
873
|
+
struct rbs_node_list *RBS_NONNULL args;
|
|
874
|
+
|
|
875
|
+
rbs_location_range name_range; /* Required */
|
|
876
|
+
rbs_location_range args_range; /* Optional */
|
|
585
877
|
} rbs_types_interface_t;
|
|
586
878
|
|
|
587
879
|
typedef struct rbs_types_intersection {
|
|
588
880
|
rbs_node_t base;
|
|
589
881
|
|
|
590
|
-
struct rbs_node_list *types;
|
|
882
|
+
struct rbs_node_list *RBS_NONNULL types;
|
|
591
883
|
} rbs_types_intersection_t;
|
|
592
884
|
|
|
593
885
|
typedef struct rbs_types_literal {
|
|
594
886
|
rbs_node_t base;
|
|
595
887
|
|
|
596
|
-
struct rbs_node *literal;
|
|
888
|
+
struct rbs_node *RBS_NONNULL literal;
|
|
597
889
|
} rbs_types_literal_t;
|
|
598
890
|
|
|
599
891
|
typedef struct rbs_types_optional {
|
|
600
892
|
rbs_node_t base;
|
|
601
893
|
|
|
602
|
-
struct rbs_node *type;
|
|
894
|
+
struct rbs_node *RBS_NONNULL type;
|
|
603
895
|
} rbs_types_optional_t;
|
|
604
896
|
|
|
605
897
|
typedef struct rbs_types_proc {
|
|
606
898
|
rbs_node_t base;
|
|
607
899
|
|
|
608
|
-
struct rbs_node *type;
|
|
609
|
-
struct rbs_types_block *block;
|
|
610
|
-
struct rbs_node *self_type;
|
|
900
|
+
struct rbs_node *RBS_NONNULL type;
|
|
901
|
+
struct rbs_types_block *RBS_NULLABLE block;
|
|
902
|
+
struct rbs_node *RBS_NULLABLE self_type;
|
|
611
903
|
} rbs_types_proc_t;
|
|
612
904
|
|
|
613
905
|
typedef struct rbs_types_record {
|
|
614
906
|
rbs_node_t base;
|
|
615
907
|
|
|
616
|
-
struct rbs_hash *all_fields;
|
|
908
|
+
struct rbs_hash *RBS_NONNULL all_fields;
|
|
617
909
|
} rbs_types_record_t;
|
|
618
910
|
|
|
619
911
|
typedef struct rbs_types_record_field_type {
|
|
620
912
|
rbs_node_t base;
|
|
621
913
|
|
|
622
|
-
struct rbs_node *type;
|
|
914
|
+
struct rbs_node *RBS_NONNULL type;
|
|
623
915
|
bool required;
|
|
624
916
|
} rbs_types_record_field_type_t;
|
|
625
917
|
|
|
626
918
|
typedef struct rbs_types_tuple {
|
|
627
919
|
rbs_node_t base;
|
|
628
920
|
|
|
629
|
-
struct rbs_node_list *types;
|
|
921
|
+
struct rbs_node_list *RBS_NONNULL types;
|
|
630
922
|
} rbs_types_tuple_t;
|
|
631
923
|
|
|
632
924
|
typedef struct rbs_types_union {
|
|
633
925
|
rbs_node_t base;
|
|
634
926
|
|
|
635
|
-
struct rbs_node_list *types;
|
|
927
|
+
struct rbs_node_list *RBS_NONNULL types;
|
|
636
928
|
} rbs_types_union_t;
|
|
637
929
|
|
|
638
930
|
typedef struct rbs_types_untyped_function {
|
|
639
931
|
rbs_node_t base;
|
|
640
932
|
|
|
641
|
-
struct rbs_node *return_type;
|
|
933
|
+
struct rbs_node *RBS_NONNULL return_type;
|
|
642
934
|
} rbs_types_untyped_function_t;
|
|
643
935
|
|
|
644
936
|
typedef struct rbs_types_variable {
|
|
645
937
|
rbs_node_t base;
|
|
646
938
|
|
|
647
|
-
struct rbs_ast_symbol *name;
|
|
939
|
+
struct rbs_ast_symbol *RBS_NONNULL name;
|
|
648
940
|
} rbs_types_variable_t;
|
|
649
941
|
|
|
650
942
|
typedef union rbs_ast_ruby_annotations {
|
|
651
943
|
rbs_node_t base;
|
|
944
|
+
rbs_ast_ruby_annotations_block_param_type_annotation_t block_param_type_annotation;
|
|
945
|
+
rbs_ast_ruby_annotations_class_alias_annotation_t class_alias_annotation;
|
|
652
946
|
rbs_ast_ruby_annotations_colon_method_type_annotation_t colon_method_type_annotation;
|
|
947
|
+
rbs_ast_ruby_annotations_double_splat_param_type_annotation_t double_splat_param_type_annotation;
|
|
948
|
+
rbs_ast_ruby_annotations_instance_variable_annotation_t instance_variable_annotation;
|
|
653
949
|
rbs_ast_ruby_annotations_method_types_annotation_t method_types_annotation;
|
|
950
|
+
rbs_ast_ruby_annotations_module_alias_annotation_t module_alias_annotation;
|
|
951
|
+
rbs_ast_ruby_annotations_module_self_annotation_t module_self_annotation;
|
|
654
952
|
rbs_ast_ruby_annotations_node_type_assertion_t node_type_assertion;
|
|
953
|
+
rbs_ast_ruby_annotations_param_type_annotation_t param_type_annotation;
|
|
655
954
|
rbs_ast_ruby_annotations_return_type_annotation_t return_type_annotation;
|
|
656
955
|
rbs_ast_ruby_annotations_skip_annotation_t skip_annotation;
|
|
956
|
+
rbs_ast_ruby_annotations_splat_param_type_annotation_t splat_param_type_annotation;
|
|
957
|
+
rbs_ast_ruby_annotations_type_application_annotation_t type_application_annotation;
|
|
657
958
|
} rbs_ast_ruby_annotations_t;
|
|
658
959
|
|
|
659
|
-
/// `rbs_keyword_t` models RBS keywords like "private", "instance", "covariant", etc.
|
|
660
|
-
/// These are stored in the global constant pool, and get surfaced to Ruby as `Symbol`s,
|
|
661
|
-
/// just like `rbs_ast_symbol_t`s.
|
|
662
|
-
typedef struct rbs_keyword {
|
|
663
|
-
rbs_node_t base;
|
|
664
|
-
rbs_constant_id_t constant_id;
|
|
665
|
-
} rbs_keyword_t;
|
|
666
|
-
|
|
667
|
-
rbs_keyword_t *rbs_keyword_new(rbs_allocator_t *, rbs_location_t *, rbs_constant_id_t);
|
|
668
|
-
|
|
669
960
|
/// `rbs_ast_symbol_t` models user-defined identifiers like class names, method names, etc.
|
|
670
961
|
/// These get stored in the parser's own constant pool, and get surfaced to Ruby as `Symbol`s.
|
|
671
962
|
typedef struct rbs_ast_symbol {
|
|
@@ -673,75 +964,84 @@ typedef struct rbs_ast_symbol {
|
|
|
673
964
|
rbs_constant_id_t constant_id;
|
|
674
965
|
} rbs_ast_symbol_t;
|
|
675
966
|
|
|
676
|
-
rbs_ast_symbol_t *rbs_ast_symbol_new(rbs_allocator_t
|
|
677
|
-
|
|
678
|
-
rbs_ast_annotation_t *rbs_ast_annotation_new(rbs_allocator_t *allocator,
|
|
679
|
-
rbs_ast_bool_t *rbs_ast_bool_new(rbs_allocator_t *allocator,
|
|
680
|
-
rbs_ast_comment_t *rbs_ast_comment_new(rbs_allocator_t *allocator,
|
|
681
|
-
rbs_ast_declarations_class_t *rbs_ast_declarations_class_new(rbs_allocator_t *allocator,
|
|
682
|
-
rbs_ast_declarations_class_super_t *rbs_ast_declarations_class_super_new(rbs_allocator_t *allocator,
|
|
683
|
-
rbs_ast_declarations_class_alias_t *rbs_ast_declarations_class_alias_new(rbs_allocator_t *allocator,
|
|
684
|
-
rbs_ast_declarations_constant_t *rbs_ast_declarations_constant_new(rbs_allocator_t *allocator,
|
|
685
|
-
rbs_ast_declarations_global_t *rbs_ast_declarations_global_new(rbs_allocator_t *allocator,
|
|
686
|
-
rbs_ast_declarations_interface_t *rbs_ast_declarations_interface_new(rbs_allocator_t *allocator,
|
|
687
|
-
rbs_ast_declarations_module_t *rbs_ast_declarations_module_new(rbs_allocator_t *allocator,
|
|
688
|
-
rbs_ast_declarations_module_self_t *rbs_ast_declarations_module_self_new(rbs_allocator_t *allocator,
|
|
689
|
-
rbs_ast_declarations_module_alias_t *rbs_ast_declarations_module_alias_new(rbs_allocator_t *allocator,
|
|
690
|
-
rbs_ast_declarations_type_alias_t *rbs_ast_declarations_type_alias_new(rbs_allocator_t *allocator,
|
|
691
|
-
rbs_ast_directives_use_t *rbs_ast_directives_use_new(rbs_allocator_t *allocator,
|
|
692
|
-
rbs_ast_directives_use_single_clause_t *rbs_ast_directives_use_single_clause_new(rbs_allocator_t *allocator,
|
|
693
|
-
rbs_ast_directives_use_wildcard_clause_t *rbs_ast_directives_use_wildcard_clause_new(rbs_allocator_t *allocator,
|
|
694
|
-
rbs_ast_integer_t *rbs_ast_integer_new(rbs_allocator_t *allocator,
|
|
695
|
-
rbs_ast_members_alias_t *rbs_ast_members_alias_new(rbs_allocator_t *allocator,
|
|
696
|
-
rbs_ast_members_attr_accessor_t *rbs_ast_members_attr_accessor_new(rbs_allocator_t *allocator,
|
|
697
|
-
rbs_ast_members_attr_reader_t *rbs_ast_members_attr_reader_new(rbs_allocator_t *allocator,
|
|
698
|
-
rbs_ast_members_attr_writer_t *rbs_ast_members_attr_writer_new(rbs_allocator_t *allocator,
|
|
699
|
-
rbs_ast_members_class_instance_variable_t *rbs_ast_members_class_instance_variable_new(rbs_allocator_t *allocator,
|
|
700
|
-
rbs_ast_members_class_variable_t *rbs_ast_members_class_variable_new(rbs_allocator_t *allocator,
|
|
701
|
-
rbs_ast_members_extend_t *rbs_ast_members_extend_new(rbs_allocator_t *allocator,
|
|
702
|
-
rbs_ast_members_include_t *rbs_ast_members_include_new(rbs_allocator_t *allocator,
|
|
703
|
-
rbs_ast_members_instance_variable_t *rbs_ast_members_instance_variable_new(rbs_allocator_t *allocator,
|
|
704
|
-
rbs_ast_members_method_definition_t *rbs_ast_members_method_definition_new(rbs_allocator_t *allocator,
|
|
705
|
-
rbs_ast_members_method_definition_overload_t *rbs_ast_members_method_definition_overload_new(rbs_allocator_t *allocator,
|
|
706
|
-
rbs_ast_members_prepend_t *rbs_ast_members_prepend_new(rbs_allocator_t *allocator,
|
|
707
|
-
rbs_ast_members_private_t *rbs_ast_members_private_new(rbs_allocator_t *allocator,
|
|
708
|
-
rbs_ast_members_public_t *rbs_ast_members_public_new(rbs_allocator_t *allocator,
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
967
|
+
rbs_ast_symbol_t *RBS_NONNULL rbs_ast_symbol_new(rbs_allocator_t *RBS_NONNULL, rbs_location_range, rbs_constant_pool_t *RBS_NONNULL, rbs_constant_id_t);
|
|
968
|
+
|
|
969
|
+
rbs_ast_annotation_t *RBS_NONNULL rbs_ast_annotation_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_string_t string);
|
|
970
|
+
rbs_ast_bool_t *RBS_NONNULL rbs_ast_bool_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, bool value);
|
|
971
|
+
rbs_ast_comment_t *RBS_NONNULL rbs_ast_comment_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_string_t string);
|
|
972
|
+
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);
|
|
973
|
+
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);
|
|
974
|
+
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);
|
|
975
|
+
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);
|
|
976
|
+
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);
|
|
977
|
+
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);
|
|
978
|
+
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);
|
|
979
|
+
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);
|
|
980
|
+
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);
|
|
981
|
+
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);
|
|
982
|
+
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);
|
|
983
|
+
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);
|
|
984
|
+
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);
|
|
985
|
+
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);
|
|
986
|
+
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);
|
|
987
|
+
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);
|
|
988
|
+
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);
|
|
989
|
+
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);
|
|
990
|
+
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);
|
|
991
|
+
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);
|
|
992
|
+
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);
|
|
993
|
+
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);
|
|
994
|
+
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);
|
|
995
|
+
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);
|
|
996
|
+
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);
|
|
997
|
+
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);
|
|
998
|
+
rbs_ast_members_private_t *RBS_NONNULL rbs_ast_members_private_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location);
|
|
999
|
+
rbs_ast_members_public_t *RBS_NONNULL rbs_ast_members_public_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location);
|
|
1000
|
+
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);
|
|
1001
|
+
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);
|
|
1002
|
+
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);
|
|
1003
|
+
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);
|
|
1004
|
+
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);
|
|
1005
|
+
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);
|
|
1006
|
+
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);
|
|
1007
|
+
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);
|
|
1008
|
+
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);
|
|
1009
|
+
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);
|
|
1010
|
+
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);
|
|
1011
|
+
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);
|
|
1012
|
+
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);
|
|
1013
|
+
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);
|
|
1014
|
+
rbs_ast_string_t *RBS_NONNULL rbs_ast_string_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_string_t string);
|
|
1015
|
+
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);
|
|
1016
|
+
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);
|
|
1017
|
+
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);
|
|
1018
|
+
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);
|
|
1019
|
+
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);
|
|
1020
|
+
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);
|
|
1021
|
+
rbs_types_bases_any_t *RBS_NONNULL rbs_types_bases_any_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, bool todo);
|
|
1022
|
+
rbs_types_bases_bool_t *RBS_NONNULL rbs_types_bases_bool_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location);
|
|
1023
|
+
rbs_types_bases_bottom_t *RBS_NONNULL rbs_types_bases_bottom_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location);
|
|
1024
|
+
rbs_types_bases_class_t *RBS_NONNULL rbs_types_bases_class_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location);
|
|
1025
|
+
rbs_types_bases_instance_t *RBS_NONNULL rbs_types_bases_instance_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location);
|
|
1026
|
+
rbs_types_bases_nil_t *RBS_NONNULL rbs_types_bases_nil_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location);
|
|
1027
|
+
rbs_types_bases_self_t *RBS_NONNULL rbs_types_bases_self_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location);
|
|
1028
|
+
rbs_types_bases_top_t *RBS_NONNULL rbs_types_bases_top_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location);
|
|
1029
|
+
rbs_types_bases_void_t *RBS_NONNULL rbs_types_bases_void_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location);
|
|
1030
|
+
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);
|
|
1031
|
+
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);
|
|
1032
|
+
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);
|
|
1033
|
+
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);
|
|
1034
|
+
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);
|
|
1035
|
+
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);
|
|
1036
|
+
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);
|
|
1037
|
+
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);
|
|
1038
|
+
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);
|
|
1039
|
+
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);
|
|
1040
|
+
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);
|
|
1041
|
+
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);
|
|
1042
|
+
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);
|
|
1043
|
+
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);
|
|
1044
|
+
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);
|
|
1045
|
+
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);
|
|
746
1046
|
|
|
747
1047
|
#endif
|