rbs 4.0.0.dev.4 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +14 -14
- data/.github/workflows/bundle-update.yml +60 -0
- data/.github/workflows/c-check.yml +18 -11
- data/.github/workflows/comments.yml +5 -3
- data/.github/workflows/dependabot.yml +2 -2
- data/.github/workflows/ruby.yml +27 -34
- data/.github/workflows/rust.yml +95 -0
- data/.github/workflows/typecheck.yml +2 -2
- data/.github/workflows/windows.yml +2 -2
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +323 -0
- data/README.md +1 -1
- data/Rakefile +43 -33
- data/Steepfile +1 -0
- data/config.yml +426 -24
- data/core/array.rbs +307 -227
- data/core/basic_object.rbs +9 -8
- data/core/binding.rbs +0 -2
- data/core/builtin.rbs +2 -2
- data/core/class.rbs +6 -5
- data/core/comparable.rbs +55 -34
- data/core/complex.rbs +104 -78
- data/core/dir.rbs +61 -49
- data/core/encoding.rbs +12 -15
- data/core/enumerable.rbs +179 -87
- data/core/enumerator/arithmetic_sequence.rbs +70 -0
- data/core/enumerator.rbs +65 -2
- data/core/errno.rbs +11 -2
- data/core/errors.rbs +58 -29
- data/core/exception.rbs +13 -13
- data/core/fiber.rbs +74 -54
- data/core/file.rbs +280 -177
- data/core/file_test.rbs +3 -3
- data/core/float.rbs +257 -92
- data/core/gc.rbs +425 -281
- data/core/hash.rbs +1045 -739
- data/core/integer.rbs +135 -137
- data/core/io/buffer.rbs +53 -42
- data/core/io/wait.rbs +13 -35
- data/core/io.rbs +192 -144
- data/core/kernel.rbs +216 -155
- data/core/marshal.rbs +4 -4
- data/core/match_data.rbs +15 -13
- data/core/math.rbs +107 -66
- data/core/method.rbs +69 -33
- data/core/module.rbs +244 -106
- data/core/nil_class.rbs +7 -6
- data/core/numeric.rbs +74 -63
- data/core/object.rbs +9 -11
- data/core/object_space.rbs +30 -23
- data/core/pathname.rbs +1322 -0
- data/core/proc.rbs +95 -58
- data/core/process.rbs +222 -202
- data/core/ractor.rbs +371 -515
- data/core/random.rbs +21 -3
- data/core/range.rbs +159 -57
- data/core/rational.rbs +60 -89
- data/core/rbs/unnamed/argf.rbs +60 -53
- data/core/rbs/unnamed/env_class.rbs +19 -14
- data/core/rbs/unnamed/main_class.rbs +123 -0
- data/core/rbs/unnamed/random.rbs +11 -118
- data/core/regexp.rbs +258 -214
- data/core/ruby.rbs +53 -0
- data/core/ruby_vm.rbs +38 -34
- data/core/rubygems/config_file.rbs +5 -5
- data/core/rubygems/errors.rbs +4 -71
- data/core/rubygems/requirement.rbs +5 -5
- data/core/rubygems/rubygems.rbs +16 -82
- data/core/rubygems/version.rbs +2 -3
- data/core/set.rbs +490 -360
- data/core/signal.rbs +26 -16
- data/core/string.rbs +3234 -1285
- data/core/struct.rbs +27 -26
- data/core/symbol.rbs +41 -34
- data/core/thread.rbs +135 -67
- data/core/time.rbs +81 -50
- data/core/trace_point.rbs +41 -35
- data/core/true_class.rbs +2 -2
- data/core/unbound_method.rbs +24 -16
- data/core/warning.rbs +7 -7
- data/docs/aliases.md +79 -0
- data/docs/collection.md +3 -3
- data/docs/config.md +171 -0
- data/docs/encoding.md +56 -0
- data/docs/gem.md +0 -1
- data/docs/inline.md +576 -0
- data/docs/sigs.md +3 -3
- data/docs/syntax.md +46 -16
- data/docs/type_fingerprint.md +21 -0
- data/exe/rbs +1 -1
- data/ext/rbs_extension/ast_translation.c +544 -116
- data/ext/rbs_extension/ast_translation.h +3 -0
- data/ext/rbs_extension/class_constants.c +16 -2
- data/ext/rbs_extension/class_constants.h +8 -0
- data/ext/rbs_extension/extconf.rb +5 -1
- data/ext/rbs_extension/legacy_location.c +33 -56
- data/ext/rbs_extension/legacy_location.h +37 -0
- data/ext/rbs_extension/main.c +44 -35
- data/include/rbs/ast.h +448 -173
- data/include/rbs/defines.h +27 -0
- data/include/rbs/lexer.h +30 -11
- data/include/rbs/location.h +25 -44
- data/include/rbs/parser.h +6 -6
- data/include/rbs/string.h +0 -2
- data/include/rbs/util/rbs_allocator.h +34 -13
- data/include/rbs/util/rbs_assert.h +12 -1
- data/include/rbs/util/rbs_constant_pool.h +0 -3
- data/include/rbs/util/rbs_encoding.h +2 -0
- data/include/rbs/util/rbs_unescape.h +2 -1
- data/include/rbs.h +8 -0
- data/lib/rbs/ast/annotation.rb +1 -1
- data/lib/rbs/ast/comment.rb +1 -1
- data/lib/rbs/ast/declarations.rb +10 -10
- data/lib/rbs/ast/members.rb +14 -14
- data/lib/rbs/ast/ruby/annotations.rb +293 -3
- data/lib/rbs/ast/ruby/comment_block.rb +24 -0
- data/lib/rbs/ast/ruby/declarations.rb +198 -3
- data/lib/rbs/ast/ruby/helpers/constant_helper.rb +4 -0
- data/lib/rbs/ast/ruby/members.rb +532 -22
- data/lib/rbs/ast/type_param.rb +24 -4
- data/lib/rbs/buffer.rb +20 -15
- data/lib/rbs/cli/diff.rb +16 -15
- data/lib/rbs/cli/validate.rb +38 -106
- data/lib/rbs/cli.rb +52 -19
- data/lib/rbs/collection/config/lockfile_generator.rb +14 -2
- data/lib/rbs/collection/sources/git.rb +1 -0
- data/lib/rbs/definition.rb +1 -1
- data/lib/rbs/definition_builder/ancestor_builder.rb +62 -9
- data/lib/rbs/definition_builder/method_builder.rb +20 -0
- data/lib/rbs/definition_builder.rb +147 -25
- data/lib/rbs/diff.rb +7 -1
- data/lib/rbs/environment.rb +227 -74
- data/lib/rbs/environment_loader.rb +0 -6
- data/lib/rbs/errors.rb +27 -18
- data/lib/rbs/inline_parser.rb +342 -6
- data/lib/rbs/location_aux.rb +1 -1
- data/lib/rbs/locator.rb +5 -1
- data/lib/rbs/method_type.rb +5 -3
- data/lib/rbs/parser_aux.rb +20 -7
- data/lib/rbs/prototype/helpers.rb +57 -0
- data/lib/rbs/prototype/rb.rb +3 -28
- data/lib/rbs/prototype/rbi.rb +3 -20
- data/lib/rbs/prototype/runtime.rb +8 -0
- data/lib/rbs/resolver/constant_resolver.rb +2 -2
- data/lib/rbs/resolver/type_name_resolver.rb +116 -38
- data/lib/rbs/subtractor.rb +3 -1
- data/lib/rbs/test/type_check.rb +19 -2
- data/lib/rbs/type_name.rb +1 -1
- data/lib/rbs/types.rb +88 -78
- data/lib/rbs/unit_test/type_assertions.rb +35 -8
- data/lib/rbs/validator.rb +2 -2
- data/lib/rbs/version.rb +1 -1
- data/lib/rbs.rb +1 -2
- data/lib/rdoc/discover.rb +1 -1
- data/lib/rdoc_plugin/parser.rb +1 -1
- data/rbs.gemspec +4 -3
- data/rust/.gitignore +1 -0
- data/rust/Cargo.lock +378 -0
- data/rust/Cargo.toml +7 -0
- data/rust/ruby-rbs/Cargo.toml +22 -0
- data/rust/ruby-rbs/build.rs +764 -0
- data/rust/ruby-rbs/examples/locations.rs +60 -0
- data/rust/ruby-rbs/src/lib.rs +1 -0
- data/rust/ruby-rbs/src/node/mod.rs +742 -0
- data/rust/ruby-rbs/tests/sanity.rs +47 -0
- data/rust/ruby-rbs/vendor/rbs/config.yml +1 -0
- data/rust/ruby-rbs-sys/Cargo.toml +23 -0
- data/rust/ruby-rbs-sys/build.rs +204 -0
- data/rust/ruby-rbs-sys/src/lib.rs +50 -0
- data/rust/ruby-rbs-sys/vendor/rbs/include +1 -0
- data/rust/ruby-rbs-sys/vendor/rbs/src +1 -0
- data/rust/ruby-rbs-sys/wrapper.h +1 -0
- data/schema/typeParam.json +17 -1
- data/sig/ast/ruby/annotations.rbs +315 -4
- data/sig/ast/ruby/comment_block.rbs +8 -0
- data/sig/ast/ruby/declarations.rbs +102 -4
- data/sig/ast/ruby/members.rbs +108 -2
- data/sig/cli/diff.rbs +5 -11
- data/sig/cli/validate.rbs +12 -8
- data/sig/cli.rbs +18 -18
- data/sig/definition.rbs +6 -1
- data/sig/definition_builder.rbs +2 -0
- data/sig/environment.rbs +70 -12
- data/sig/errors.rbs +13 -14
- data/sig/inline_parser.rbs +39 -2
- data/sig/locator.rbs +0 -2
- data/sig/manifest.yaml +0 -1
- data/sig/method_builder.rbs +3 -1
- data/sig/parser.rbs +31 -13
- data/sig/prototype/helpers.rbs +2 -0
- data/sig/resolver/type_name_resolver.rbs +35 -7
- data/sig/source.rbs +3 -3
- data/sig/type_param.rbs +13 -8
- data/sig/types.rbs +6 -7
- data/sig/unit_test/spy.rbs +0 -8
- data/sig/unit_test/type_assertions.rbs +11 -0
- data/src/ast.c +410 -153
- data/src/lexer.c +1392 -1313
- data/src/lexer.re +3 -0
- data/src/lexstate.c +58 -37
- data/src/location.c +8 -48
- data/src/parser.c +977 -516
- data/src/string.c +0 -48
- data/src/util/rbs_allocator.c +89 -71
- data/src/util/rbs_assert.c +1 -1
- data/src/util/rbs_buffer.c +2 -2
- data/src/util/rbs_constant_pool.c +10 -14
- data/src/util/rbs_encoding.c +4 -8
- data/src/util/rbs_unescape.c +56 -20
- data/stdlib/bigdecimal/0/big_decimal.rbs +116 -98
- data/stdlib/bigdecimal-math/0/big_math.rbs +169 -8
- data/stdlib/cgi/0/core.rbs +9 -393
- data/stdlib/cgi/0/manifest.yaml +1 -0
- data/stdlib/cgi-escape/0/escape.rbs +171 -0
- data/stdlib/coverage/0/coverage.rbs +7 -4
- data/stdlib/date/0/date.rbs +92 -79
- data/stdlib/date/0/date_time.rbs +25 -24
- data/stdlib/delegate/0/delegator.rbs +10 -7
- data/stdlib/did_you_mean/0/did_you_mean.rbs +17 -16
- data/stdlib/digest/0/digest.rbs +110 -0
- data/stdlib/erb/0/erb.rbs +748 -347
- data/stdlib/etc/0/etc.rbs +55 -50
- data/stdlib/fileutils/0/fileutils.rbs +158 -139
- data/stdlib/forwardable/0/forwardable.rbs +13 -10
- data/stdlib/io-console/0/io-console.rbs +2 -2
- data/stdlib/json/0/json.rbs +217 -136
- data/stdlib/monitor/0/monitor.rbs +3 -3
- data/stdlib/net-http/0/net-http.rbs +162 -134
- data/stdlib/objspace/0/objspace.rbs +17 -34
- data/stdlib/open-uri/0/open-uri.rbs +48 -8
- data/stdlib/open3/0/open3.rbs +469 -10
- data/stdlib/openssl/0/openssl.rbs +475 -357
- data/stdlib/optparse/0/optparse.rbs +26 -17
- data/stdlib/pathname/0/pathname.rbs +11 -1381
- data/stdlib/pp/0/pp.rbs +9 -8
- data/stdlib/prettyprint/0/prettyprint.rbs +7 -7
- data/stdlib/pstore/0/pstore.rbs +35 -30
- data/stdlib/psych/0/psych.rbs +65 -12
- data/stdlib/psych/0/store.rbs +2 -4
- data/stdlib/pty/0/pty.rbs +9 -6
- data/stdlib/random-formatter/0/random-formatter.rbs +277 -0
- data/stdlib/rdoc/0/code_object.rbs +2 -1
- data/stdlib/rdoc/0/parser.rbs +1 -1
- data/stdlib/rdoc/0/rdoc.rbs +1 -1
- data/stdlib/rdoc/0/store.rbs +1 -1
- data/stdlib/resolv/0/resolv.rbs +25 -68
- data/stdlib/ripper/0/ripper.rbs +22 -19
- data/stdlib/securerandom/0/manifest.yaml +2 -0
- data/stdlib/securerandom/0/securerandom.rbs +7 -20
- data/stdlib/shellwords/0/shellwords.rbs +2 -2
- data/stdlib/singleton/0/singleton.rbs +3 -0
- data/stdlib/socket/0/addrinfo.rbs +7 -7
- data/stdlib/socket/0/basic_socket.rbs +3 -3
- data/stdlib/socket/0/ip_socket.rbs +10 -8
- data/stdlib/socket/0/socket.rbs +23 -10
- data/stdlib/socket/0/tcp_server.rbs +1 -1
- data/stdlib/socket/0/tcp_socket.rbs +11 -3
- data/stdlib/socket/0/udp_socket.rbs +1 -1
- data/stdlib/socket/0/unix_server.rbs +1 -1
- data/stdlib/stringio/0/stringio.rbs +1177 -85
- data/stdlib/strscan/0/string_scanner.rbs +27 -25
- data/stdlib/tempfile/0/tempfile.rbs +25 -21
- data/stdlib/time/0/time.rbs +8 -6
- data/stdlib/timeout/0/timeout.rbs +63 -7
- data/stdlib/tsort/0/cyclic.rbs +3 -0
- data/stdlib/tsort/0/tsort.rbs +7 -6
- data/stdlib/uri/0/common.rbs +42 -20
- data/stdlib/uri/0/file.rbs +3 -3
- data/stdlib/uri/0/generic.rbs +26 -18
- data/stdlib/uri/0/http.rbs +2 -2
- data/stdlib/uri/0/ldap.rbs +2 -2
- data/stdlib/uri/0/mailto.rbs +3 -3
- data/stdlib/uri/0/rfc2396_parser.rbs +12 -12
- data/stdlib/zlib/0/deflate.rbs +4 -3
- data/stdlib/zlib/0/gzip_reader.rbs +6 -6
- data/stdlib/zlib/0/gzip_writer.rbs +14 -12
- data/stdlib/zlib/0/inflate.rbs +1 -1
- data/stdlib/zlib/0/need_dict.rbs +1 -1
- data/stdlib/zlib/0/zstream.rbs +1 -0
- metadata +50 -6
data/include/rbs/ast.h
CHANGED
|
@@ -13,6 +13,51 @@
|
|
|
13
13
|
#include "string.h"
|
|
14
14
|
#include "location.h"
|
|
15
15
|
|
|
16
|
+
enum rbs_attribute_visibility {
|
|
17
|
+
RBS_ATTRIBUTE_VISIBILITY_UNSPECIFIED, /* unspecified (nil) */
|
|
18
|
+
RBS_ATTRIBUTE_VISIBILITY_PUBLIC, /* public (:public) */
|
|
19
|
+
RBS_ATTRIBUTE_VISIBILITY_PRIVATE, /* private (:private) */
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
enum rbs_attribute_kind {
|
|
23
|
+
RBS_ATTRIBUTE_KIND_INSTANCE, /* instance (:instance) */
|
|
24
|
+
RBS_ATTRIBUTE_KIND_SINGLETON, /* singleton (:singleton) */
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
enum rbs_alias_kind {
|
|
28
|
+
RBS_ALIAS_KIND_INSTANCE, /* instance (:instance) */
|
|
29
|
+
RBS_ALIAS_KIND_SINGLETON, /* singleton (:singleton) */
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
enum rbs_method_definition_kind {
|
|
33
|
+
RBS_METHOD_DEFINITION_KIND_INSTANCE, /* instance (:instance) */
|
|
34
|
+
RBS_METHOD_DEFINITION_KIND_SINGLETON, /* singleton (:singleton) */
|
|
35
|
+
RBS_METHOD_DEFINITION_KIND_SINGLETON_INSTANCE, /* singleton_instance (:singleton_instance) */
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
enum rbs_method_definition_visibility {
|
|
39
|
+
RBS_METHOD_DEFINITION_VISIBILITY_UNSPECIFIED, /* unspecified (nil) */
|
|
40
|
+
RBS_METHOD_DEFINITION_VISIBILITY_PUBLIC, /* public (:public) */
|
|
41
|
+
RBS_METHOD_DEFINITION_VISIBILITY_PRIVATE, /* private (:private) */
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
enum rbs_type_param_variance {
|
|
45
|
+
RBS_TYPE_PARAM_VARIANCE_INVARIANT, /* invariant (:invariant) */
|
|
46
|
+
RBS_TYPE_PARAM_VARIANCE_COVARIANT, /* covariant (:covariant) */
|
|
47
|
+
RBS_TYPE_PARAM_VARIANCE_CONTRAVARIANT, /* contravariant (:contravariant) */
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
enum rbs_attr_ivar_name_tag {
|
|
51
|
+
RBS_ATTR_IVAR_NAME_TAG_UNSPECIFIED, /* The attribute has inferred instance variable (nil) */
|
|
52
|
+
RBS_ATTR_IVAR_NAME_TAG_EMPTY, /* The attribute has no instance variable (false) */
|
|
53
|
+
RBS_ATTR_IVAR_NAME_TAG_NAME, /* The attribute has instance variable with the given name */
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
typedef struct rbs_attr_ivar_name {
|
|
57
|
+
enum rbs_attr_ivar_name_tag tag;
|
|
58
|
+
rbs_constant_id_t name; /* valid when tag == RBS_ATTR_IVAR_NAME_TAG_NAME */
|
|
59
|
+
} rbs_attr_ivar_name_t;
|
|
60
|
+
|
|
16
61
|
enum rbs_node_type {
|
|
17
62
|
RBS_AST_ANNOTATION = 1,
|
|
18
63
|
RBS_AST_BOOL = 2,
|
|
@@ -45,50 +90,57 @@ enum rbs_node_type {
|
|
|
45
90
|
RBS_AST_MEMBERS_PREPEND = 29,
|
|
46
91
|
RBS_AST_MEMBERS_PRIVATE = 30,
|
|
47
92
|
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
|
-
|
|
93
|
+
RBS_AST_RUBY_ANNOTATIONS_BLOCK_PARAM_TYPE_ANNOTATION = 32,
|
|
94
|
+
RBS_AST_RUBY_ANNOTATIONS_CLASS_ALIAS_ANNOTATION = 33,
|
|
95
|
+
RBS_AST_RUBY_ANNOTATIONS_COLON_METHOD_TYPE_ANNOTATION = 34,
|
|
96
|
+
RBS_AST_RUBY_ANNOTATIONS_DOUBLE_SPLAT_PARAM_TYPE_ANNOTATION = 35,
|
|
97
|
+
RBS_AST_RUBY_ANNOTATIONS_INSTANCE_VARIABLE_ANNOTATION = 36,
|
|
98
|
+
RBS_AST_RUBY_ANNOTATIONS_METHOD_TYPES_ANNOTATION = 37,
|
|
99
|
+
RBS_AST_RUBY_ANNOTATIONS_MODULE_ALIAS_ANNOTATION = 38,
|
|
100
|
+
RBS_AST_RUBY_ANNOTATIONS_NODE_TYPE_ASSERTION = 39,
|
|
101
|
+
RBS_AST_RUBY_ANNOTATIONS_PARAM_TYPE_ANNOTATION = 40,
|
|
102
|
+
RBS_AST_RUBY_ANNOTATIONS_RETURN_TYPE_ANNOTATION = 41,
|
|
103
|
+
RBS_AST_RUBY_ANNOTATIONS_SKIP_ANNOTATION = 42,
|
|
104
|
+
RBS_AST_RUBY_ANNOTATIONS_SPLAT_PARAM_TYPE_ANNOTATION = 43,
|
|
105
|
+
RBS_AST_RUBY_ANNOTATIONS_TYPE_APPLICATION_ANNOTATION = 44,
|
|
106
|
+
RBS_AST_STRING = 45,
|
|
107
|
+
RBS_AST_TYPE_PARAM = 46,
|
|
108
|
+
RBS_METHOD_TYPE = 47,
|
|
109
|
+
RBS_NAMESPACE = 48,
|
|
110
|
+
RBS_SIGNATURE = 49,
|
|
111
|
+
RBS_TYPE_NAME = 50,
|
|
112
|
+
RBS_TYPES_ALIAS = 51,
|
|
113
|
+
RBS_TYPES_BASES_ANY = 52,
|
|
114
|
+
RBS_TYPES_BASES_BOOL = 53,
|
|
115
|
+
RBS_TYPES_BASES_BOTTOM = 54,
|
|
116
|
+
RBS_TYPES_BASES_CLASS = 55,
|
|
117
|
+
RBS_TYPES_BASES_INSTANCE = 56,
|
|
118
|
+
RBS_TYPES_BASES_NIL = 57,
|
|
119
|
+
RBS_TYPES_BASES_SELF = 58,
|
|
120
|
+
RBS_TYPES_BASES_TOP = 59,
|
|
121
|
+
RBS_TYPES_BASES_VOID = 60,
|
|
122
|
+
RBS_TYPES_BLOCK = 61,
|
|
123
|
+
RBS_TYPES_CLASS_INSTANCE = 62,
|
|
124
|
+
RBS_TYPES_CLASS_SINGLETON = 63,
|
|
125
|
+
RBS_TYPES_FUNCTION = 64,
|
|
126
|
+
RBS_TYPES_FUNCTION_PARAM = 65,
|
|
127
|
+
RBS_TYPES_INTERFACE = 66,
|
|
128
|
+
RBS_TYPES_INTERSECTION = 67,
|
|
129
|
+
RBS_TYPES_LITERAL = 68,
|
|
130
|
+
RBS_TYPES_OPTIONAL = 69,
|
|
131
|
+
RBS_TYPES_PROC = 70,
|
|
132
|
+
RBS_TYPES_RECORD = 71,
|
|
133
|
+
RBS_TYPES_RECORD_FIELD_TYPE = 72,
|
|
134
|
+
RBS_TYPES_TUPLE = 73,
|
|
135
|
+
RBS_TYPES_UNION = 74,
|
|
136
|
+
RBS_TYPES_UNTYPED_FUNCTION = 75,
|
|
137
|
+
RBS_TYPES_VARIABLE = 76,
|
|
86
138
|
RBS_AST_SYMBOL,
|
|
87
139
|
};
|
|
88
140
|
|
|
89
141
|
typedef struct rbs_node {
|
|
90
142
|
enum rbs_node_type type;
|
|
91
|
-
|
|
143
|
+
rbs_location_range location;
|
|
92
144
|
} rbs_node_t;
|
|
93
145
|
|
|
94
146
|
const char *rbs_node_type_name(rbs_node_t *node);
|
|
@@ -159,10 +211,16 @@ typedef struct rbs_ast_declarations_class {
|
|
|
159
211
|
|
|
160
212
|
struct rbs_type_name *name;
|
|
161
213
|
struct rbs_node_list *type_params;
|
|
162
|
-
struct rbs_ast_declarations_class_super *super_class;
|
|
214
|
+
struct rbs_ast_declarations_class_super *super_class; /* Optional */
|
|
163
215
|
struct rbs_node_list *members;
|
|
164
216
|
struct rbs_node_list *annotations;
|
|
165
|
-
struct rbs_ast_comment *comment;
|
|
217
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
218
|
+
|
|
219
|
+
rbs_location_range keyword_range; /* Required */
|
|
220
|
+
rbs_location_range name_range; /* Required */
|
|
221
|
+
rbs_location_range end_range; /* Required */
|
|
222
|
+
rbs_location_range type_params_range; /* Optional */
|
|
223
|
+
rbs_location_range lt_range; /* Optional */
|
|
166
224
|
} rbs_ast_declarations_class_t;
|
|
167
225
|
|
|
168
226
|
typedef struct rbs_ast_declarations_class_super {
|
|
@@ -170,6 +228,9 @@ typedef struct rbs_ast_declarations_class_super {
|
|
|
170
228
|
|
|
171
229
|
struct rbs_type_name *name;
|
|
172
230
|
struct rbs_node_list *args;
|
|
231
|
+
|
|
232
|
+
rbs_location_range name_range; /* Required */
|
|
233
|
+
rbs_location_range args_range; /* Optional */
|
|
173
234
|
} rbs_ast_declarations_class_super_t;
|
|
174
235
|
|
|
175
236
|
typedef struct rbs_ast_declarations_class_alias {
|
|
@@ -177,8 +238,13 @@ typedef struct rbs_ast_declarations_class_alias {
|
|
|
177
238
|
|
|
178
239
|
struct rbs_type_name *new_name;
|
|
179
240
|
struct rbs_type_name *old_name;
|
|
180
|
-
struct rbs_ast_comment *comment;
|
|
241
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
181
242
|
struct rbs_node_list *annotations;
|
|
243
|
+
|
|
244
|
+
rbs_location_range keyword_range; /* Required */
|
|
245
|
+
rbs_location_range new_name_range; /* Required */
|
|
246
|
+
rbs_location_range eq_range; /* Required */
|
|
247
|
+
rbs_location_range old_name_range; /* Required */
|
|
182
248
|
} rbs_ast_declarations_class_alias_t;
|
|
183
249
|
|
|
184
250
|
typedef struct rbs_ast_declarations_constant {
|
|
@@ -186,8 +252,11 @@ typedef struct rbs_ast_declarations_constant {
|
|
|
186
252
|
|
|
187
253
|
struct rbs_type_name *name;
|
|
188
254
|
struct rbs_node *type;
|
|
189
|
-
struct rbs_ast_comment *comment;
|
|
255
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
190
256
|
struct rbs_node_list *annotations;
|
|
257
|
+
|
|
258
|
+
rbs_location_range name_range; /* Required */
|
|
259
|
+
rbs_location_range colon_range; /* Required */
|
|
191
260
|
} rbs_ast_declarations_constant_t;
|
|
192
261
|
|
|
193
262
|
typedef struct rbs_ast_declarations_global {
|
|
@@ -195,8 +264,11 @@ typedef struct rbs_ast_declarations_global {
|
|
|
195
264
|
|
|
196
265
|
struct rbs_ast_symbol *name;
|
|
197
266
|
struct rbs_node *type;
|
|
198
|
-
struct rbs_ast_comment *comment;
|
|
267
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
199
268
|
struct rbs_node_list *annotations;
|
|
269
|
+
|
|
270
|
+
rbs_location_range name_range; /* Required */
|
|
271
|
+
rbs_location_range colon_range; /* Required */
|
|
200
272
|
} rbs_ast_declarations_global_t;
|
|
201
273
|
|
|
202
274
|
typedef struct rbs_ast_declarations_interface {
|
|
@@ -206,7 +278,12 @@ typedef struct rbs_ast_declarations_interface {
|
|
|
206
278
|
struct rbs_node_list *type_params;
|
|
207
279
|
struct rbs_node_list *members;
|
|
208
280
|
struct rbs_node_list *annotations;
|
|
209
|
-
struct rbs_ast_comment *comment;
|
|
281
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
282
|
+
|
|
283
|
+
rbs_location_range keyword_range; /* Required */
|
|
284
|
+
rbs_location_range name_range; /* Required */
|
|
285
|
+
rbs_location_range end_range; /* Required */
|
|
286
|
+
rbs_location_range type_params_range; /* Optional */
|
|
210
287
|
} rbs_ast_declarations_interface_t;
|
|
211
288
|
|
|
212
289
|
typedef struct rbs_ast_declarations_module {
|
|
@@ -217,7 +294,14 @@ typedef struct rbs_ast_declarations_module {
|
|
|
217
294
|
struct rbs_node_list *self_types;
|
|
218
295
|
struct rbs_node_list *members;
|
|
219
296
|
struct rbs_node_list *annotations;
|
|
220
|
-
struct rbs_ast_comment *comment;
|
|
297
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
298
|
+
|
|
299
|
+
rbs_location_range keyword_range; /* Required */
|
|
300
|
+
rbs_location_range name_range; /* Required */
|
|
301
|
+
rbs_location_range end_range; /* Required */
|
|
302
|
+
rbs_location_range type_params_range; /* Optional */
|
|
303
|
+
rbs_location_range colon_range; /* Optional */
|
|
304
|
+
rbs_location_range self_types_range; /* Optional */
|
|
221
305
|
} rbs_ast_declarations_module_t;
|
|
222
306
|
|
|
223
307
|
typedef struct rbs_ast_declarations_module_self {
|
|
@@ -225,6 +309,9 @@ typedef struct rbs_ast_declarations_module_self {
|
|
|
225
309
|
|
|
226
310
|
struct rbs_type_name *name;
|
|
227
311
|
struct rbs_node_list *args;
|
|
312
|
+
|
|
313
|
+
rbs_location_range name_range; /* Required */
|
|
314
|
+
rbs_location_range args_range; /* Optional */
|
|
228
315
|
} rbs_ast_declarations_module_self_t;
|
|
229
316
|
|
|
230
317
|
typedef struct rbs_ast_declarations_module_alias {
|
|
@@ -232,8 +319,13 @@ typedef struct rbs_ast_declarations_module_alias {
|
|
|
232
319
|
|
|
233
320
|
struct rbs_type_name *new_name;
|
|
234
321
|
struct rbs_type_name *old_name;
|
|
235
|
-
struct rbs_ast_comment *comment;
|
|
322
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
236
323
|
struct rbs_node_list *annotations;
|
|
324
|
+
|
|
325
|
+
rbs_location_range keyword_range; /* Required */
|
|
326
|
+
rbs_location_range new_name_range; /* Required */
|
|
327
|
+
rbs_location_range eq_range; /* Required */
|
|
328
|
+
rbs_location_range old_name_range; /* Required */
|
|
237
329
|
} rbs_ast_declarations_module_alias_t;
|
|
238
330
|
|
|
239
331
|
typedef struct rbs_ast_declarations_type_alias {
|
|
@@ -243,26 +335,40 @@ typedef struct rbs_ast_declarations_type_alias {
|
|
|
243
335
|
struct rbs_node_list *type_params;
|
|
244
336
|
struct rbs_node *type;
|
|
245
337
|
struct rbs_node_list *annotations;
|
|
246
|
-
struct rbs_ast_comment *comment;
|
|
338
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
339
|
+
|
|
340
|
+
rbs_location_range keyword_range; /* Required */
|
|
341
|
+
rbs_location_range name_range; /* Required */
|
|
342
|
+
rbs_location_range eq_range; /* Required */
|
|
343
|
+
rbs_location_range type_params_range; /* Optional */
|
|
247
344
|
} rbs_ast_declarations_type_alias_t;
|
|
248
345
|
|
|
249
346
|
typedef struct rbs_ast_directives_use {
|
|
250
347
|
rbs_node_t base;
|
|
251
348
|
|
|
252
349
|
struct rbs_node_list *clauses;
|
|
350
|
+
|
|
351
|
+
rbs_location_range keyword_range; /* Required */
|
|
253
352
|
} rbs_ast_directives_use_t;
|
|
254
353
|
|
|
255
354
|
typedef struct rbs_ast_directives_use_single_clause {
|
|
256
355
|
rbs_node_t base;
|
|
257
356
|
|
|
258
357
|
struct rbs_type_name *type_name;
|
|
259
|
-
struct rbs_ast_symbol *new_name;
|
|
358
|
+
struct rbs_ast_symbol *new_name; /* Optional */
|
|
359
|
+
|
|
360
|
+
rbs_location_range type_name_range; /* Required */
|
|
361
|
+
rbs_location_range keyword_range; /* Optional */
|
|
362
|
+
rbs_location_range new_name_range; /* Optional */
|
|
260
363
|
} rbs_ast_directives_use_single_clause_t;
|
|
261
364
|
|
|
262
365
|
typedef struct rbs_ast_directives_use_wildcard_clause {
|
|
263
366
|
rbs_node_t base;
|
|
264
367
|
|
|
265
368
|
struct rbs_namespace *rbs_namespace;
|
|
369
|
+
|
|
370
|
+
rbs_location_range namespace_range; /* Required */
|
|
371
|
+
rbs_location_range star_range; /* Required */
|
|
266
372
|
} rbs_ast_directives_use_wildcard_clause_t;
|
|
267
373
|
|
|
268
374
|
typedef struct rbs_ast_integer {
|
|
@@ -276,9 +382,15 @@ typedef struct rbs_ast_members_alias {
|
|
|
276
382
|
|
|
277
383
|
struct rbs_ast_symbol *new_name;
|
|
278
384
|
struct rbs_ast_symbol *old_name;
|
|
279
|
-
|
|
385
|
+
enum rbs_alias_kind kind;
|
|
280
386
|
struct rbs_node_list *annotations;
|
|
281
|
-
struct rbs_ast_comment *comment;
|
|
387
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
388
|
+
|
|
389
|
+
rbs_location_range keyword_range; /* Required */
|
|
390
|
+
rbs_location_range new_name_range; /* Required */
|
|
391
|
+
rbs_location_range old_name_range; /* Required */
|
|
392
|
+
rbs_location_range new_kind_range; /* Optional */
|
|
393
|
+
rbs_location_range old_kind_range; /* Optional */
|
|
282
394
|
} rbs_ast_members_alias_t;
|
|
283
395
|
|
|
284
396
|
typedef struct rbs_ast_members_attr_accessor {
|
|
@@ -286,11 +398,19 @@ typedef struct rbs_ast_members_attr_accessor {
|
|
|
286
398
|
|
|
287
399
|
struct rbs_ast_symbol *name;
|
|
288
400
|
struct rbs_node *type;
|
|
289
|
-
|
|
290
|
-
|
|
401
|
+
rbs_attr_ivar_name_t ivar_name;
|
|
402
|
+
enum rbs_attribute_kind kind;
|
|
291
403
|
struct rbs_node_list *annotations;
|
|
292
|
-
struct rbs_ast_comment *comment;
|
|
293
|
-
|
|
404
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
405
|
+
enum rbs_attribute_visibility visibility;
|
|
406
|
+
|
|
407
|
+
rbs_location_range keyword_range; /* Required */
|
|
408
|
+
rbs_location_range name_range; /* Required */
|
|
409
|
+
rbs_location_range colon_range; /* Required */
|
|
410
|
+
rbs_location_range kind_range; /* Optional */
|
|
411
|
+
rbs_location_range ivar_range; /* Optional */
|
|
412
|
+
rbs_location_range ivar_name_range; /* Optional */
|
|
413
|
+
rbs_location_range visibility_range; /* Optional */
|
|
294
414
|
} rbs_ast_members_attr_accessor_t;
|
|
295
415
|
|
|
296
416
|
typedef struct rbs_ast_members_attr_reader {
|
|
@@ -298,11 +418,19 @@ typedef struct rbs_ast_members_attr_reader {
|
|
|
298
418
|
|
|
299
419
|
struct rbs_ast_symbol *name;
|
|
300
420
|
struct rbs_node *type;
|
|
301
|
-
|
|
302
|
-
|
|
421
|
+
rbs_attr_ivar_name_t ivar_name;
|
|
422
|
+
enum rbs_attribute_kind kind;
|
|
303
423
|
struct rbs_node_list *annotations;
|
|
304
|
-
struct rbs_ast_comment *comment;
|
|
305
|
-
|
|
424
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
425
|
+
enum rbs_attribute_visibility visibility;
|
|
426
|
+
|
|
427
|
+
rbs_location_range keyword_range; /* Required */
|
|
428
|
+
rbs_location_range name_range; /* Required */
|
|
429
|
+
rbs_location_range colon_range; /* Required */
|
|
430
|
+
rbs_location_range kind_range; /* Optional */
|
|
431
|
+
rbs_location_range ivar_range; /* Optional */
|
|
432
|
+
rbs_location_range ivar_name_range; /* Optional */
|
|
433
|
+
rbs_location_range visibility_range; /* Optional */
|
|
306
434
|
} rbs_ast_members_attr_reader_t;
|
|
307
435
|
|
|
308
436
|
typedef struct rbs_ast_members_attr_writer {
|
|
@@ -310,11 +438,19 @@ typedef struct rbs_ast_members_attr_writer {
|
|
|
310
438
|
|
|
311
439
|
struct rbs_ast_symbol *name;
|
|
312
440
|
struct rbs_node *type;
|
|
313
|
-
|
|
314
|
-
|
|
441
|
+
rbs_attr_ivar_name_t ivar_name;
|
|
442
|
+
enum rbs_attribute_kind kind;
|
|
315
443
|
struct rbs_node_list *annotations;
|
|
316
|
-
struct rbs_ast_comment *comment;
|
|
317
|
-
|
|
444
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
445
|
+
enum rbs_attribute_visibility visibility;
|
|
446
|
+
|
|
447
|
+
rbs_location_range keyword_range; /* Required */
|
|
448
|
+
rbs_location_range name_range; /* Required */
|
|
449
|
+
rbs_location_range colon_range; /* Required */
|
|
450
|
+
rbs_location_range kind_range; /* Optional */
|
|
451
|
+
rbs_location_range ivar_range; /* Optional */
|
|
452
|
+
rbs_location_range ivar_name_range; /* Optional */
|
|
453
|
+
rbs_location_range visibility_range; /* Optional */
|
|
318
454
|
} rbs_ast_members_attr_writer_t;
|
|
319
455
|
|
|
320
456
|
typedef struct rbs_ast_members_class_instance_variable {
|
|
@@ -322,7 +458,11 @@ typedef struct rbs_ast_members_class_instance_variable {
|
|
|
322
458
|
|
|
323
459
|
struct rbs_ast_symbol *name;
|
|
324
460
|
struct rbs_node *type;
|
|
325
|
-
struct rbs_ast_comment *comment;
|
|
461
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
462
|
+
|
|
463
|
+
rbs_location_range name_range; /* Required */
|
|
464
|
+
rbs_location_range colon_range; /* Required */
|
|
465
|
+
rbs_location_range kind_range; /* Optional */
|
|
326
466
|
} rbs_ast_members_class_instance_variable_t;
|
|
327
467
|
|
|
328
468
|
typedef struct rbs_ast_members_class_variable {
|
|
@@ -330,7 +470,11 @@ typedef struct rbs_ast_members_class_variable {
|
|
|
330
470
|
|
|
331
471
|
struct rbs_ast_symbol *name;
|
|
332
472
|
struct rbs_node *type;
|
|
333
|
-
struct rbs_ast_comment *comment;
|
|
473
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
474
|
+
|
|
475
|
+
rbs_location_range name_range; /* Required */
|
|
476
|
+
rbs_location_range colon_range; /* Required */
|
|
477
|
+
rbs_location_range kind_range; /* Optional */
|
|
334
478
|
} rbs_ast_members_class_variable_t;
|
|
335
479
|
|
|
336
480
|
typedef struct rbs_ast_members_extend {
|
|
@@ -339,7 +483,11 @@ typedef struct rbs_ast_members_extend {
|
|
|
339
483
|
struct rbs_type_name *name;
|
|
340
484
|
struct rbs_node_list *args;
|
|
341
485
|
struct rbs_node_list *annotations;
|
|
342
|
-
struct rbs_ast_comment *comment;
|
|
486
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
487
|
+
|
|
488
|
+
rbs_location_range name_range; /* Required */
|
|
489
|
+
rbs_location_range keyword_range; /* Required */
|
|
490
|
+
rbs_location_range args_range; /* Optional */
|
|
343
491
|
} rbs_ast_members_extend_t;
|
|
344
492
|
|
|
345
493
|
typedef struct rbs_ast_members_include {
|
|
@@ -348,7 +496,11 @@ typedef struct rbs_ast_members_include {
|
|
|
348
496
|
struct rbs_type_name *name;
|
|
349
497
|
struct rbs_node_list *args;
|
|
350
498
|
struct rbs_node_list *annotations;
|
|
351
|
-
struct rbs_ast_comment *comment;
|
|
499
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
500
|
+
|
|
501
|
+
rbs_location_range name_range; /* Required */
|
|
502
|
+
rbs_location_range keyword_range; /* Required */
|
|
503
|
+
rbs_location_range args_range; /* Optional */
|
|
352
504
|
} rbs_ast_members_include_t;
|
|
353
505
|
|
|
354
506
|
typedef struct rbs_ast_members_instance_variable {
|
|
@@ -356,19 +508,29 @@ typedef struct rbs_ast_members_instance_variable {
|
|
|
356
508
|
|
|
357
509
|
struct rbs_ast_symbol *name;
|
|
358
510
|
struct rbs_node *type;
|
|
359
|
-
struct rbs_ast_comment *comment;
|
|
511
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
512
|
+
|
|
513
|
+
rbs_location_range name_range; /* Required */
|
|
514
|
+
rbs_location_range colon_range; /* Required */
|
|
515
|
+
rbs_location_range kind_range; /* Optional */
|
|
360
516
|
} rbs_ast_members_instance_variable_t;
|
|
361
517
|
|
|
362
518
|
typedef struct rbs_ast_members_method_definition {
|
|
363
519
|
rbs_node_t base;
|
|
364
520
|
|
|
365
521
|
struct rbs_ast_symbol *name;
|
|
366
|
-
|
|
522
|
+
enum rbs_method_definition_kind kind;
|
|
367
523
|
struct rbs_node_list *overloads;
|
|
368
524
|
struct rbs_node_list *annotations;
|
|
369
|
-
struct rbs_ast_comment *comment;
|
|
525
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
370
526
|
bool overloading;
|
|
371
|
-
|
|
527
|
+
enum rbs_method_definition_visibility visibility;
|
|
528
|
+
|
|
529
|
+
rbs_location_range keyword_range; /* Required */
|
|
530
|
+
rbs_location_range name_range; /* Required */
|
|
531
|
+
rbs_location_range kind_range; /* Optional */
|
|
532
|
+
rbs_location_range overloading_range; /* Optional */
|
|
533
|
+
rbs_location_range visibility_range; /* Optional */
|
|
372
534
|
} rbs_ast_members_method_definition_t;
|
|
373
535
|
|
|
374
536
|
typedef struct rbs_ast_members_method_definition_overload {
|
|
@@ -384,7 +546,11 @@ typedef struct rbs_ast_members_prepend {
|
|
|
384
546
|
struct rbs_type_name *name;
|
|
385
547
|
struct rbs_node_list *args;
|
|
386
548
|
struct rbs_node_list *annotations;
|
|
387
|
-
struct rbs_ast_comment *comment;
|
|
549
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
550
|
+
|
|
551
|
+
rbs_location_range name_range; /* Required */
|
|
552
|
+
rbs_location_range keyword_range; /* Required */
|
|
553
|
+
rbs_location_range args_range; /* Optional */
|
|
388
554
|
} rbs_ast_members_prepend_t;
|
|
389
555
|
|
|
390
556
|
typedef struct rbs_ast_members_private {
|
|
@@ -397,47 +563,131 @@ typedef struct rbs_ast_members_public {
|
|
|
397
563
|
|
|
398
564
|
} rbs_ast_members_public_t;
|
|
399
565
|
|
|
566
|
+
typedef struct rbs_ast_ruby_annotations_block_param_type_annotation {
|
|
567
|
+
rbs_node_t base;
|
|
568
|
+
|
|
569
|
+
rbs_location_range prefix_location;
|
|
570
|
+
rbs_location_range ampersand_location;
|
|
571
|
+
rbs_location_range name_location; /* Optional */
|
|
572
|
+
rbs_location_range colon_location;
|
|
573
|
+
rbs_location_range question_location; /* Optional */
|
|
574
|
+
rbs_location_range type_location;
|
|
575
|
+
struct rbs_node *type_;
|
|
576
|
+
rbs_location_range comment_location; /* Optional */
|
|
577
|
+
} rbs_ast_ruby_annotations_block_param_type_annotation_t;
|
|
578
|
+
|
|
579
|
+
typedef struct rbs_ast_ruby_annotations_class_alias_annotation {
|
|
580
|
+
rbs_node_t base;
|
|
581
|
+
|
|
582
|
+
rbs_location_range prefix_location;
|
|
583
|
+
rbs_location_range keyword_location;
|
|
584
|
+
struct rbs_type_name *type_name;
|
|
585
|
+
rbs_location_range type_name_location; /* Optional */
|
|
586
|
+
} rbs_ast_ruby_annotations_class_alias_annotation_t;
|
|
587
|
+
|
|
400
588
|
typedef struct rbs_ast_ruby_annotations_colon_method_type_annotation {
|
|
401
589
|
rbs_node_t base;
|
|
402
590
|
|
|
403
|
-
|
|
591
|
+
rbs_location_range prefix_location;
|
|
404
592
|
struct rbs_node_list *annotations;
|
|
405
593
|
struct rbs_node *method_type;
|
|
406
594
|
} rbs_ast_ruby_annotations_colon_method_type_annotation_t;
|
|
407
595
|
|
|
596
|
+
typedef struct rbs_ast_ruby_annotations_double_splat_param_type_annotation {
|
|
597
|
+
rbs_node_t base;
|
|
598
|
+
|
|
599
|
+
rbs_location_range prefix_location;
|
|
600
|
+
rbs_location_range star2_location;
|
|
601
|
+
rbs_location_range name_location; /* Optional */
|
|
602
|
+
rbs_location_range colon_location;
|
|
603
|
+
struct rbs_node *param_type;
|
|
604
|
+
rbs_location_range comment_location; /* Optional */
|
|
605
|
+
} rbs_ast_ruby_annotations_double_splat_param_type_annotation_t;
|
|
606
|
+
|
|
607
|
+
typedef struct rbs_ast_ruby_annotations_instance_variable_annotation {
|
|
608
|
+
rbs_node_t base;
|
|
609
|
+
|
|
610
|
+
rbs_location_range prefix_location;
|
|
611
|
+
struct rbs_ast_symbol *ivar_name;
|
|
612
|
+
rbs_location_range ivar_name_location;
|
|
613
|
+
rbs_location_range colon_location;
|
|
614
|
+
struct rbs_node *type;
|
|
615
|
+
rbs_location_range comment_location; /* Optional */
|
|
616
|
+
} rbs_ast_ruby_annotations_instance_variable_annotation_t;
|
|
617
|
+
|
|
408
618
|
typedef struct rbs_ast_ruby_annotations_method_types_annotation {
|
|
409
619
|
rbs_node_t base;
|
|
410
620
|
|
|
411
|
-
|
|
621
|
+
rbs_location_range prefix_location;
|
|
412
622
|
struct rbs_node_list *overloads;
|
|
413
|
-
|
|
623
|
+
rbs_location_range_list_t *vertical_bar_locations;
|
|
624
|
+
rbs_location_range dot3_location; /* Optional */
|
|
414
625
|
} rbs_ast_ruby_annotations_method_types_annotation_t;
|
|
415
626
|
|
|
627
|
+
typedef struct rbs_ast_ruby_annotations_module_alias_annotation {
|
|
628
|
+
rbs_node_t base;
|
|
629
|
+
|
|
630
|
+
rbs_location_range prefix_location;
|
|
631
|
+
rbs_location_range keyword_location;
|
|
632
|
+
struct rbs_type_name *type_name;
|
|
633
|
+
rbs_location_range type_name_location; /* Optional */
|
|
634
|
+
} rbs_ast_ruby_annotations_module_alias_annotation_t;
|
|
635
|
+
|
|
416
636
|
typedef struct rbs_ast_ruby_annotations_node_type_assertion {
|
|
417
637
|
rbs_node_t base;
|
|
418
638
|
|
|
419
|
-
|
|
639
|
+
rbs_location_range prefix_location;
|
|
420
640
|
struct rbs_node *type;
|
|
421
641
|
} rbs_ast_ruby_annotations_node_type_assertion_t;
|
|
422
642
|
|
|
643
|
+
typedef struct rbs_ast_ruby_annotations_param_type_annotation {
|
|
644
|
+
rbs_node_t base;
|
|
645
|
+
|
|
646
|
+
rbs_location_range prefix_location;
|
|
647
|
+
rbs_location_range name_location;
|
|
648
|
+
rbs_location_range colon_location;
|
|
649
|
+
struct rbs_node *param_type;
|
|
650
|
+
rbs_location_range comment_location; /* Optional */
|
|
651
|
+
} rbs_ast_ruby_annotations_param_type_annotation_t;
|
|
652
|
+
|
|
423
653
|
typedef struct rbs_ast_ruby_annotations_return_type_annotation {
|
|
424
654
|
rbs_node_t base;
|
|
425
655
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
656
|
+
rbs_location_range prefix_location;
|
|
657
|
+
rbs_location_range return_location;
|
|
658
|
+
rbs_location_range colon_location;
|
|
429
659
|
struct rbs_node *return_type;
|
|
430
|
-
|
|
660
|
+
rbs_location_range comment_location; /* Optional */
|
|
431
661
|
} rbs_ast_ruby_annotations_return_type_annotation_t;
|
|
432
662
|
|
|
433
663
|
typedef struct rbs_ast_ruby_annotations_skip_annotation {
|
|
434
664
|
rbs_node_t base;
|
|
435
665
|
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
666
|
+
rbs_location_range prefix_location;
|
|
667
|
+
rbs_location_range skip_location;
|
|
668
|
+
rbs_location_range comment_location; /* Optional */
|
|
439
669
|
} rbs_ast_ruby_annotations_skip_annotation_t;
|
|
440
670
|
|
|
671
|
+
typedef struct rbs_ast_ruby_annotations_splat_param_type_annotation {
|
|
672
|
+
rbs_node_t base;
|
|
673
|
+
|
|
674
|
+
rbs_location_range prefix_location;
|
|
675
|
+
rbs_location_range star_location;
|
|
676
|
+
rbs_location_range name_location; /* Optional */
|
|
677
|
+
rbs_location_range colon_location;
|
|
678
|
+
struct rbs_node *param_type;
|
|
679
|
+
rbs_location_range comment_location; /* Optional */
|
|
680
|
+
} rbs_ast_ruby_annotations_splat_param_type_annotation_t;
|
|
681
|
+
|
|
682
|
+
typedef struct rbs_ast_ruby_annotations_type_application_annotation {
|
|
683
|
+
rbs_node_t base;
|
|
684
|
+
|
|
685
|
+
rbs_location_range prefix_location;
|
|
686
|
+
struct rbs_node_list *type_args;
|
|
687
|
+
rbs_location_range close_bracket_location;
|
|
688
|
+
rbs_location_range_list_t *comma_locations;
|
|
689
|
+
} rbs_ast_ruby_annotations_type_application_annotation_t;
|
|
690
|
+
|
|
441
691
|
typedef struct rbs_ast_string {
|
|
442
692
|
rbs_node_t base;
|
|
443
693
|
|
|
@@ -448,10 +698,18 @@ typedef struct rbs_ast_type_param {
|
|
|
448
698
|
rbs_node_t base;
|
|
449
699
|
|
|
450
700
|
struct rbs_ast_symbol *name;
|
|
451
|
-
|
|
452
|
-
struct rbs_node *upper_bound;
|
|
453
|
-
struct rbs_node *
|
|
701
|
+
enum rbs_type_param_variance variance;
|
|
702
|
+
struct rbs_node *upper_bound; /* Optional */
|
|
703
|
+
struct rbs_node *lower_bound; /* Optional */
|
|
704
|
+
struct rbs_node *default_type; /* Optional */
|
|
454
705
|
bool unchecked;
|
|
706
|
+
|
|
707
|
+
rbs_location_range name_range; /* Required */
|
|
708
|
+
rbs_location_range variance_range; /* Optional */
|
|
709
|
+
rbs_location_range unchecked_range; /* Optional */
|
|
710
|
+
rbs_location_range upper_bound_range; /* Optional */
|
|
711
|
+
rbs_location_range lower_bound_range; /* Optional */
|
|
712
|
+
rbs_location_range default_range; /* Optional */
|
|
455
713
|
} rbs_ast_type_param_t;
|
|
456
714
|
|
|
457
715
|
typedef struct rbs_method_type {
|
|
@@ -459,7 +717,10 @@ typedef struct rbs_method_type {
|
|
|
459
717
|
|
|
460
718
|
struct rbs_node_list *type_params;
|
|
461
719
|
struct rbs_node *type;
|
|
462
|
-
struct rbs_types_block *block;
|
|
720
|
+
struct rbs_types_block *block; /* Optional */
|
|
721
|
+
|
|
722
|
+
rbs_location_range type_range; /* Required */
|
|
723
|
+
rbs_location_range type_params_range; /* Optional */
|
|
463
724
|
} rbs_method_type_t;
|
|
464
725
|
|
|
465
726
|
typedef struct rbs_namespace {
|
|
@@ -488,6 +749,9 @@ typedef struct rbs_types_alias {
|
|
|
488
749
|
|
|
489
750
|
struct rbs_type_name *name;
|
|
490
751
|
struct rbs_node_list *args;
|
|
752
|
+
|
|
753
|
+
rbs_location_range name_range; /* Required */
|
|
754
|
+
rbs_location_range args_range; /* Optional */
|
|
491
755
|
} rbs_types_alias_t;
|
|
492
756
|
|
|
493
757
|
typedef struct rbs_types_bases_any {
|
|
@@ -541,7 +805,7 @@ typedef struct rbs_types_block {
|
|
|
541
805
|
|
|
542
806
|
struct rbs_node *type;
|
|
543
807
|
bool required;
|
|
544
|
-
struct rbs_node *self_type;
|
|
808
|
+
struct rbs_node *self_type; /* Optional */
|
|
545
809
|
} rbs_types_block_t;
|
|
546
810
|
|
|
547
811
|
typedef struct rbs_types_class_instance {
|
|
@@ -549,12 +813,19 @@ typedef struct rbs_types_class_instance {
|
|
|
549
813
|
|
|
550
814
|
struct rbs_type_name *name;
|
|
551
815
|
struct rbs_node_list *args;
|
|
816
|
+
|
|
817
|
+
rbs_location_range name_range; /* Required */
|
|
818
|
+
rbs_location_range args_range; /* Optional */
|
|
552
819
|
} rbs_types_class_instance_t;
|
|
553
820
|
|
|
554
821
|
typedef struct rbs_types_class_singleton {
|
|
555
822
|
rbs_node_t base;
|
|
556
823
|
|
|
557
824
|
struct rbs_type_name *name;
|
|
825
|
+
struct rbs_node_list *args;
|
|
826
|
+
|
|
827
|
+
rbs_location_range name_range; /* Required */
|
|
828
|
+
rbs_location_range args_range; /* Optional */
|
|
558
829
|
} rbs_types_class_singleton_t;
|
|
559
830
|
|
|
560
831
|
typedef struct rbs_types_function {
|
|
@@ -562,11 +833,11 @@ typedef struct rbs_types_function {
|
|
|
562
833
|
|
|
563
834
|
struct rbs_node_list *required_positionals;
|
|
564
835
|
struct rbs_node_list *optional_positionals;
|
|
565
|
-
struct rbs_node *rest_positionals;
|
|
836
|
+
struct rbs_node *rest_positionals; /* Optional */
|
|
566
837
|
struct rbs_node_list *trailing_positionals;
|
|
567
838
|
struct rbs_hash *required_keywords;
|
|
568
839
|
struct rbs_hash *optional_keywords;
|
|
569
|
-
struct rbs_node *rest_keywords;
|
|
840
|
+
struct rbs_node *rest_keywords; /* Optional */
|
|
570
841
|
struct rbs_node *return_type;
|
|
571
842
|
} rbs_types_function_t;
|
|
572
843
|
|
|
@@ -574,7 +845,9 @@ typedef struct rbs_types_function_param {
|
|
|
574
845
|
rbs_node_t base;
|
|
575
846
|
|
|
576
847
|
struct rbs_node *type;
|
|
577
|
-
struct rbs_ast_symbol *name;
|
|
848
|
+
struct rbs_ast_symbol *name; /* Optional */
|
|
849
|
+
|
|
850
|
+
rbs_location_range name_range; /* Optional */
|
|
578
851
|
} rbs_types_function_param_t;
|
|
579
852
|
|
|
580
853
|
typedef struct rbs_types_interface {
|
|
@@ -582,6 +855,9 @@ typedef struct rbs_types_interface {
|
|
|
582
855
|
|
|
583
856
|
struct rbs_type_name *name;
|
|
584
857
|
struct rbs_node_list *args;
|
|
858
|
+
|
|
859
|
+
rbs_location_range name_range; /* Required */
|
|
860
|
+
rbs_location_range args_range; /* Optional */
|
|
585
861
|
} rbs_types_interface_t;
|
|
586
862
|
|
|
587
863
|
typedef struct rbs_types_intersection {
|
|
@@ -606,8 +882,8 @@ typedef struct rbs_types_proc {
|
|
|
606
882
|
rbs_node_t base;
|
|
607
883
|
|
|
608
884
|
struct rbs_node *type;
|
|
609
|
-
struct rbs_types_block *block;
|
|
610
|
-
struct rbs_node *self_type;
|
|
885
|
+
struct rbs_types_block *block; /* Optional */
|
|
886
|
+
struct rbs_node *self_type; /* Optional */
|
|
611
887
|
} rbs_types_proc_t;
|
|
612
888
|
|
|
613
889
|
typedef struct rbs_types_record {
|
|
@@ -654,18 +930,9 @@ typedef union rbs_ast_ruby_annotations {
|
|
|
654
930
|
rbs_ast_ruby_annotations_node_type_assertion_t node_type_assertion;
|
|
655
931
|
rbs_ast_ruby_annotations_return_type_annotation_t return_type_annotation;
|
|
656
932
|
rbs_ast_ruby_annotations_skip_annotation_t skip_annotation;
|
|
933
|
+
rbs_ast_ruby_annotations_param_type_annotation_t param_type_annotation;
|
|
657
934
|
} rbs_ast_ruby_annotations_t;
|
|
658
935
|
|
|
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
936
|
/// `rbs_ast_symbol_t` models user-defined identifiers like class names, method names, etc.
|
|
670
937
|
/// These get stored in the parser's own constant pool, and get surfaced to Ruby as `Symbol`s.
|
|
671
938
|
typedef struct rbs_ast_symbol {
|
|
@@ -673,75 +940,83 @@ typedef struct rbs_ast_symbol {
|
|
|
673
940
|
rbs_constant_id_t constant_id;
|
|
674
941
|
} rbs_ast_symbol_t;
|
|
675
942
|
|
|
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
|
-
|
|
943
|
+
rbs_ast_symbol_t *rbs_ast_symbol_new(rbs_allocator_t *, rbs_location_range, rbs_constant_pool_t *, rbs_constant_id_t);
|
|
944
|
+
|
|
945
|
+
rbs_ast_annotation_t *rbs_ast_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_string_t string);
|
|
946
|
+
rbs_ast_bool_t *rbs_ast_bool_new(rbs_allocator_t *allocator, rbs_location_range location, bool value);
|
|
947
|
+
rbs_ast_comment_t *rbs_ast_comment_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_string_t string);
|
|
948
|
+
rbs_ast_declarations_class_t *rbs_ast_declarations_class_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *name, rbs_node_list_t *type_params, rbs_ast_declarations_class_super_t *super_class, rbs_node_list_t *members, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range end_range);
|
|
949
|
+
rbs_ast_declarations_class_super_t *rbs_ast_declarations_class_super_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *name, rbs_node_list_t *args, rbs_location_range name_range);
|
|
950
|
+
rbs_ast_declarations_class_alias_t *rbs_ast_declarations_class_alias_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *new_name, rbs_type_name_t *old_name, rbs_ast_comment_t *comment, rbs_node_list_t *annotations, rbs_location_range keyword_range, rbs_location_range new_name_range, rbs_location_range eq_range, rbs_location_range old_name_range);
|
|
951
|
+
rbs_ast_declarations_constant_t *rbs_ast_declarations_constant_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *name, rbs_node_t *type, rbs_ast_comment_t *comment, rbs_node_list_t *annotations, rbs_location_range name_range, rbs_location_range colon_range);
|
|
952
|
+
rbs_ast_declarations_global_t *rbs_ast_declarations_global_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_ast_comment_t *comment, rbs_node_list_t *annotations, rbs_location_range name_range, rbs_location_range colon_range);
|
|
953
|
+
rbs_ast_declarations_interface_t *rbs_ast_declarations_interface_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *name, rbs_node_list_t *type_params, rbs_node_list_t *members, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range end_range);
|
|
954
|
+
rbs_ast_declarations_module_t *rbs_ast_declarations_module_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *name, rbs_node_list_t *type_params, rbs_node_list_t *self_types, rbs_node_list_t *members, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range end_range);
|
|
955
|
+
rbs_ast_declarations_module_self_t *rbs_ast_declarations_module_self_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *name, rbs_node_list_t *args, rbs_location_range name_range);
|
|
956
|
+
rbs_ast_declarations_module_alias_t *rbs_ast_declarations_module_alias_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *new_name, rbs_type_name_t *old_name, rbs_ast_comment_t *comment, rbs_node_list_t *annotations, rbs_location_range keyword_range, rbs_location_range new_name_range, rbs_location_range eq_range, rbs_location_range old_name_range);
|
|
957
|
+
rbs_ast_declarations_type_alias_t *rbs_ast_declarations_type_alias_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *name, rbs_node_list_t *type_params, rbs_node_t *type, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range eq_range);
|
|
958
|
+
rbs_ast_directives_use_t *rbs_ast_directives_use_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_list_t *clauses, rbs_location_range keyword_range);
|
|
959
|
+
rbs_ast_directives_use_single_clause_t *rbs_ast_directives_use_single_clause_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *type_name, rbs_ast_symbol_t *new_name, rbs_location_range type_name_range);
|
|
960
|
+
rbs_ast_directives_use_wildcard_clause_t *rbs_ast_directives_use_wildcard_clause_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_namespace_t *rbs_namespace, rbs_location_range namespace_range, rbs_location_range star_range);
|
|
961
|
+
rbs_ast_integer_t *rbs_ast_integer_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_string_t string_representation);
|
|
962
|
+
rbs_ast_members_alias_t *rbs_ast_members_alias_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_ast_symbol_t *new_name, rbs_ast_symbol_t *old_name, enum rbs_alias_kind kind, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, rbs_location_range keyword_range, rbs_location_range new_name_range, rbs_location_range old_name_range);
|
|
963
|
+
rbs_ast_members_attr_accessor_t *rbs_ast_members_attr_accessor_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_attr_ivar_name_t ivar_name, enum rbs_attribute_kind kind, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, enum rbs_attribute_visibility visibility, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range colon_range);
|
|
964
|
+
rbs_ast_members_attr_reader_t *rbs_ast_members_attr_reader_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_attr_ivar_name_t ivar_name, enum rbs_attribute_kind kind, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, enum rbs_attribute_visibility visibility, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range colon_range);
|
|
965
|
+
rbs_ast_members_attr_writer_t *rbs_ast_members_attr_writer_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_attr_ivar_name_t ivar_name, enum rbs_attribute_kind kind, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, enum rbs_attribute_visibility visibility, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range colon_range);
|
|
966
|
+
rbs_ast_members_class_instance_variable_t *rbs_ast_members_class_instance_variable_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_ast_comment_t *comment, rbs_location_range name_range, rbs_location_range colon_range);
|
|
967
|
+
rbs_ast_members_class_variable_t *rbs_ast_members_class_variable_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_ast_comment_t *comment, rbs_location_range name_range, rbs_location_range colon_range);
|
|
968
|
+
rbs_ast_members_extend_t *rbs_ast_members_extend_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *name, rbs_node_list_t *args, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, rbs_location_range name_range, rbs_location_range keyword_range);
|
|
969
|
+
rbs_ast_members_include_t *rbs_ast_members_include_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *name, rbs_node_list_t *args, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, rbs_location_range name_range, rbs_location_range keyword_range);
|
|
970
|
+
rbs_ast_members_instance_variable_t *rbs_ast_members_instance_variable_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_ast_comment_t *comment, rbs_location_range name_range, rbs_location_range colon_range);
|
|
971
|
+
rbs_ast_members_method_definition_t *rbs_ast_members_method_definition_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_ast_symbol_t *name, enum rbs_method_definition_kind kind, rbs_node_list_t *overloads, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, bool overloading, enum rbs_method_definition_visibility visibility, rbs_location_range keyword_range, rbs_location_range name_range);
|
|
972
|
+
rbs_ast_members_method_definition_overload_t *rbs_ast_members_method_definition_overload_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_list_t *annotations, rbs_node_t *method_type);
|
|
973
|
+
rbs_ast_members_prepend_t *rbs_ast_members_prepend_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *name, rbs_node_list_t *args, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, rbs_location_range name_range, rbs_location_range keyword_range);
|
|
974
|
+
rbs_ast_members_private_t *rbs_ast_members_private_new(rbs_allocator_t *allocator, rbs_location_range location);
|
|
975
|
+
rbs_ast_members_public_t *rbs_ast_members_public_new(rbs_allocator_t *allocator, rbs_location_range location);
|
|
976
|
+
rbs_ast_ruby_annotations_block_param_type_annotation_t *rbs_ast_ruby_annotations_block_param_type_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range ampersand_location, rbs_location_range name_location, rbs_location_range colon_location, rbs_location_range question_location, rbs_location_range type_location, rbs_node_t *type_, rbs_location_range comment_location);
|
|
977
|
+
rbs_ast_ruby_annotations_class_alias_annotation_t *rbs_ast_ruby_annotations_class_alias_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range keyword_location, rbs_type_name_t *type_name, rbs_location_range type_name_location);
|
|
978
|
+
rbs_ast_ruby_annotations_colon_method_type_annotation_t *rbs_ast_ruby_annotations_colon_method_type_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_node_list_t *annotations, rbs_node_t *method_type);
|
|
979
|
+
rbs_ast_ruby_annotations_double_splat_param_type_annotation_t *rbs_ast_ruby_annotations_double_splat_param_type_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range star2_location, rbs_location_range name_location, rbs_location_range colon_location, rbs_node_t *param_type, rbs_location_range comment_location);
|
|
980
|
+
rbs_ast_ruby_annotations_instance_variable_annotation_t *rbs_ast_ruby_annotations_instance_variable_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_ast_symbol_t *ivar_name, rbs_location_range ivar_name_location, rbs_location_range colon_location, rbs_node_t *type, rbs_location_range comment_location);
|
|
981
|
+
rbs_ast_ruby_annotations_method_types_annotation_t *rbs_ast_ruby_annotations_method_types_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_node_list_t *overloads, rbs_location_range_list_t *vertical_bar_locations, rbs_location_range dot3_location);
|
|
982
|
+
rbs_ast_ruby_annotations_module_alias_annotation_t *rbs_ast_ruby_annotations_module_alias_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range keyword_location, rbs_type_name_t *type_name, rbs_location_range type_name_location);
|
|
983
|
+
rbs_ast_ruby_annotations_node_type_assertion_t *rbs_ast_ruby_annotations_node_type_assertion_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_node_t *type);
|
|
984
|
+
rbs_ast_ruby_annotations_param_type_annotation_t *rbs_ast_ruby_annotations_param_type_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range name_location, rbs_location_range colon_location, rbs_node_t *param_type, rbs_location_range comment_location);
|
|
985
|
+
rbs_ast_ruby_annotations_return_type_annotation_t *rbs_ast_ruby_annotations_return_type_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range return_location, rbs_location_range colon_location, rbs_node_t *return_type, rbs_location_range comment_location);
|
|
986
|
+
rbs_ast_ruby_annotations_skip_annotation_t *rbs_ast_ruby_annotations_skip_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range skip_location, rbs_location_range comment_location);
|
|
987
|
+
rbs_ast_ruby_annotations_splat_param_type_annotation_t *rbs_ast_ruby_annotations_splat_param_type_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range star_location, rbs_location_range name_location, rbs_location_range colon_location, rbs_node_t *param_type, rbs_location_range comment_location);
|
|
988
|
+
rbs_ast_ruby_annotations_type_application_annotation_t *rbs_ast_ruby_annotations_type_application_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_node_list_t *type_args, rbs_location_range close_bracket_location, rbs_location_range_list_t *comma_locations);
|
|
989
|
+
rbs_ast_string_t *rbs_ast_string_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_string_t string);
|
|
990
|
+
rbs_ast_type_param_t *rbs_ast_type_param_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_ast_symbol_t *name, enum rbs_type_param_variance variance, rbs_node_t *upper_bound, rbs_node_t *lower_bound, rbs_node_t *default_type, bool unchecked, rbs_location_range name_range);
|
|
991
|
+
rbs_method_type_t *rbs_method_type_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_list_t *type_params, rbs_node_t *type, rbs_types_block_t *block, rbs_location_range type_range);
|
|
992
|
+
rbs_namespace_t *rbs_namespace_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_list_t *path, bool absolute);
|
|
993
|
+
rbs_signature_t *rbs_signature_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_list_t *directives, rbs_node_list_t *declarations);
|
|
994
|
+
rbs_type_name_t *rbs_type_name_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_namespace_t *rbs_namespace, rbs_ast_symbol_t *name);
|
|
995
|
+
rbs_types_alias_t *rbs_types_alias_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *name, rbs_node_list_t *args, rbs_location_range name_range);
|
|
996
|
+
rbs_types_bases_any_t *rbs_types_bases_any_new(rbs_allocator_t *allocator, rbs_location_range location, bool todo);
|
|
997
|
+
rbs_types_bases_bool_t *rbs_types_bases_bool_new(rbs_allocator_t *allocator, rbs_location_range location);
|
|
998
|
+
rbs_types_bases_bottom_t *rbs_types_bases_bottom_new(rbs_allocator_t *allocator, rbs_location_range location);
|
|
999
|
+
rbs_types_bases_class_t *rbs_types_bases_class_new(rbs_allocator_t *allocator, rbs_location_range location);
|
|
1000
|
+
rbs_types_bases_instance_t *rbs_types_bases_instance_new(rbs_allocator_t *allocator, rbs_location_range location);
|
|
1001
|
+
rbs_types_bases_nil_t *rbs_types_bases_nil_new(rbs_allocator_t *allocator, rbs_location_range location);
|
|
1002
|
+
rbs_types_bases_self_t *rbs_types_bases_self_new(rbs_allocator_t *allocator, rbs_location_range location);
|
|
1003
|
+
rbs_types_bases_top_t *rbs_types_bases_top_new(rbs_allocator_t *allocator, rbs_location_range location);
|
|
1004
|
+
rbs_types_bases_void_t *rbs_types_bases_void_new(rbs_allocator_t *allocator, rbs_location_range location);
|
|
1005
|
+
rbs_types_block_t *rbs_types_block_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_t *type, bool required, rbs_node_t *self_type);
|
|
1006
|
+
rbs_types_class_instance_t *rbs_types_class_instance_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *name, rbs_node_list_t *args, rbs_location_range name_range);
|
|
1007
|
+
rbs_types_class_singleton_t *rbs_types_class_singleton_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *name, rbs_node_list_t *args, rbs_location_range name_range);
|
|
1008
|
+
rbs_types_function_t *rbs_types_function_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_list_t *required_positionals, rbs_node_list_t *optional_positionals, rbs_node_t *rest_positionals, rbs_node_list_t *trailing_positionals, rbs_hash_t *required_keywords, rbs_hash_t *optional_keywords, rbs_node_t *rest_keywords, rbs_node_t *return_type);
|
|
1009
|
+
rbs_types_function_param_t *rbs_types_function_param_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_t *type, rbs_ast_symbol_t *name);
|
|
1010
|
+
rbs_types_interface_t *rbs_types_interface_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_type_name_t *name, rbs_node_list_t *args, rbs_location_range name_range);
|
|
1011
|
+
rbs_types_intersection_t *rbs_types_intersection_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_list_t *types);
|
|
1012
|
+
rbs_types_literal_t *rbs_types_literal_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_t *literal);
|
|
1013
|
+
rbs_types_optional_t *rbs_types_optional_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_t *type);
|
|
1014
|
+
rbs_types_proc_t *rbs_types_proc_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_t *type, rbs_types_block_t *block, rbs_node_t *self_type);
|
|
1015
|
+
rbs_types_record_t *rbs_types_record_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_hash_t *all_fields);
|
|
1016
|
+
rbs_types_record_field_type_t *rbs_types_record_field_type_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_t *type, bool required);
|
|
1017
|
+
rbs_types_tuple_t *rbs_types_tuple_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_list_t *types);
|
|
1018
|
+
rbs_types_union_t *rbs_types_union_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_list_t *types);
|
|
1019
|
+
rbs_types_untyped_function_t *rbs_types_untyped_function_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_node_t *return_type);
|
|
1020
|
+
rbs_types_variable_t *rbs_types_variable_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_ast_symbol_t *name);
|
|
746
1021
|
|
|
747
1022
|
#endif
|