rbs 3.10.4 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +14 -14
- data/.github/workflows/bundle-update.yml +60 -0
- data/.github/workflows/c-check.yml +7 -5
- data/.github/workflows/comments.yml +2 -2
- data/.github/workflows/dependabot.yml +2 -2
- data/.github/workflows/ruby.yml +16 -26
- data/.github/workflows/rust.yml +95 -0
- data/.github/workflows/typecheck.yml +1 -1
- data/.github/workflows/windows.yml +2 -2
- data/.rubocop.yml +2 -2
- data/.vscode/extensions.json +5 -0
- data/.vscode/settings.json +19 -0
- data/CHANGELOG.md +202 -2
- data/Rakefile +9 -23
- data/Steepfile +2 -0
- data/config.yml +457 -13
- data/core/array.rbs +218 -188
- data/core/basic_object.rbs +9 -8
- data/core/binding.rbs +0 -2
- data/core/builtin.rbs +2 -2
- data/core/class.rbs +6 -5
- data/core/comparable.rbs +45 -31
- data/core/complex.rbs +66 -55
- data/core/dir.rbs +57 -45
- data/core/encoding.rbs +6 -6
- data/core/enumerable.rbs +105 -91
- data/core/enumerator/arithmetic_sequence.rbs +70 -0
- data/core/enumerator.rbs +24 -3
- data/core/errno.rbs +3 -2
- data/core/errors.rbs +31 -29
- data/core/exception.rbs +12 -12
- data/core/fiber.rbs +47 -36
- data/core/file.rbs +242 -169
- data/core/file_test.rbs +2 -2
- data/core/float.rbs +42 -68
- data/core/gc.rbs +78 -70
- data/core/hash.rbs +70 -60
- data/core/integer.rbs +32 -75
- data/core/io/buffer.rbs +36 -36
- data/core/io/wait.rbs +7 -7
- data/core/io.rbs +192 -146
- data/core/kernel.rbs +198 -147
- data/core/marshal.rbs +3 -3
- data/core/match_data.rbs +14 -12
- data/core/math.rbs +69 -67
- data/core/method.rbs +6 -8
- data/core/module.rbs +148 -88
- data/core/nil_class.rbs +4 -3
- data/core/numeric.rbs +53 -50
- data/core/object.rbs +6 -8
- data/core/object_space.rbs +11 -10
- data/core/pathname.rbs +131 -81
- data/core/proc.rbs +65 -34
- data/core/process.rbs +221 -201
- data/core/ractor.rbs +15 -11
- data/core/random.rbs +21 -3
- data/core/range.rbs +152 -49
- data/core/rational.rbs +5 -56
- data/core/rbs/unnamed/argf.rbs +58 -51
- data/core/rbs/unnamed/env_class.rbs +18 -13
- data/core/rbs/unnamed/main_class.rbs +123 -0
- data/core/rbs/unnamed/random.rbs +7 -116
- data/core/regexp.rbs +236 -197
- data/core/ruby.rbs +1 -1
- data/core/ruby_vm.rbs +32 -30
- data/core/rubygems/config_file.rbs +5 -5
- data/core/rubygems/errors.rbs +1 -1
- data/core/rubygems/requirement.rbs +5 -5
- data/core/rubygems/rubygems.rbs +5 -3
- data/core/set.rbs +17 -16
- data/core/signal.rbs +2 -2
- data/core/string.rbs +318 -298
- data/core/struct.rbs +26 -25
- data/core/symbol.rbs +25 -24
- data/core/thread.rbs +40 -41
- data/core/time.rbs +47 -42
- data/core/trace_point.rbs +34 -31
- data/core/true_class.rbs +2 -2
- data/core/unbound_method.rbs +10 -10
- data/core/warning.rbs +7 -7
- data/docs/collection.md +1 -1
- data/docs/config.md +171 -0
- data/docs/inline.md +576 -0
- data/docs/syntax.md +46 -16
- data/docs/type_fingerprint.md +21 -0
- data/exe/rbs +1 -1
- data/ext/rbs_extension/ast_translation.c +595 -98
- data/ext/rbs_extension/class_constants.c +30 -0
- data/ext/rbs_extension/class_constants.h +15 -0
- data/ext/rbs_extension/legacy_location.c +30 -53
- data/ext/rbs_extension/legacy_location.h +37 -0
- data/ext/rbs_extension/main.c +125 -24
- data/include/rbs/ast.h +485 -150
- data/include/rbs/lexer.h +11 -4
- data/include/rbs/location.h +25 -44
- data/include/rbs/parser.h +20 -2
- data/include/rbs/util/rbs_constant_pool.h +0 -3
- data/include/rbs.h +8 -0
- data/lib/rbs/ast/annotation.rb +1 -1
- data/lib/rbs/ast/comment.rb +1 -1
- data/lib/rbs/ast/declarations.rb +10 -10
- data/lib/rbs/ast/members.rb +14 -14
- data/lib/rbs/ast/ruby/annotations.rb +409 -0
- data/lib/rbs/ast/ruby/comment_block.rb +245 -0
- data/lib/rbs/ast/ruby/declarations.rb +281 -0
- data/lib/rbs/ast/ruby/helpers/constant_helper.rb +28 -0
- data/lib/rbs/ast/ruby/helpers/location_helper.rb +15 -0
- data/lib/rbs/ast/ruby/members.rb +723 -0
- data/lib/rbs/ast/type_param.rb +24 -4
- data/lib/rbs/buffer.rb +105 -20
- data/lib/rbs/cli/diff.rb +16 -15
- data/lib/rbs/cli/validate.rb +62 -125
- data/lib/rbs/cli.rb +55 -23
- data/lib/rbs/collection/config/lockfile_generator.rb +8 -4
- data/lib/rbs/collection/sources/git.rb +1 -0
- data/lib/rbs/collection.rb +0 -1
- data/lib/rbs/definition.rb +6 -1
- data/lib/rbs/definition_builder/ancestor_builder.rb +119 -63
- data/lib/rbs/definition_builder/method_builder.rb +65 -30
- data/lib/rbs/definition_builder.rb +177 -20
- data/lib/rbs/diff.rb +7 -1
- data/lib/rbs/environment/class_entry.rb +69 -0
- data/lib/rbs/environment/module_entry.rb +66 -0
- data/lib/rbs/environment.rb +338 -155
- data/lib/rbs/environment_loader.rb +2 -2
- data/lib/rbs/errors.rb +30 -20
- data/lib/rbs/inline_parser/comment_association.rb +117 -0
- data/lib/rbs/inline_parser.rb +542 -0
- data/lib/rbs/location_aux.rb +36 -4
- data/lib/rbs/locator.rb +5 -1
- data/lib/rbs/method_type.rb +5 -3
- data/lib/rbs/namespace.rb +0 -7
- data/lib/rbs/parser_aux.rb +31 -8
- data/lib/rbs/prototype/helpers.rb +57 -0
- data/lib/rbs/prototype/rb.rb +3 -28
- data/lib/rbs/prototype/rbi.rb +3 -20
- data/lib/rbs/prototype/runtime.rb +10 -2
- data/lib/rbs/resolver/type_name_resolver.rb +0 -8
- data/lib/rbs/source.rb +99 -0
- data/lib/rbs/subtractor.rb +4 -3
- data/lib/rbs/test/type_check.rb +5 -2
- data/lib/rbs/type_name.rb +1 -8
- data/lib/rbs/types.rb +88 -78
- data/lib/rbs/unit_test/convertibles.rb +1 -0
- data/lib/rbs/unit_test/type_assertions.rb +35 -8
- data/lib/rbs/validator.rb +2 -2
- data/lib/rbs/version.rb +1 -1
- data/lib/rbs.rb +12 -1
- data/rbs.gemspec +3 -2
- data/rust/.gitignore +1 -0
- data/rust/Cargo.lock +378 -0
- data/rust/Cargo.toml +7 -0
- data/rust/ruby-rbs/Cargo.toml +22 -0
- data/rust/ruby-rbs/build.rs +764 -0
- data/rust/ruby-rbs/examples/locations.rs +60 -0
- data/rust/ruby-rbs/src/lib.rs +1 -0
- data/rust/ruby-rbs/src/node/mod.rs +742 -0
- data/rust/ruby-rbs/tests/sanity.rs +47 -0
- data/rust/ruby-rbs/vendor/rbs/config.yml +1 -0
- data/rust/ruby-rbs-sys/Cargo.toml +23 -0
- data/rust/ruby-rbs-sys/build.rs +204 -0
- data/rust/ruby-rbs-sys/src/lib.rs +50 -0
- data/rust/ruby-rbs-sys/vendor/rbs/include +1 -0
- data/rust/ruby-rbs-sys/vendor/rbs/src +1 -0
- data/rust/ruby-rbs-sys/wrapper.h +1 -0
- data/schema/typeParam.json +17 -1
- data/sig/ancestor_builder.rbs +1 -1
- data/sig/ast/ruby/annotations.rbs +421 -0
- data/sig/ast/ruby/comment_block.rbs +127 -0
- data/sig/ast/ruby/declarations.rbs +158 -0
- data/sig/ast/ruby/helpers/constant_helper.rbs +11 -0
- data/sig/ast/ruby/helpers/location_helper.rbs +15 -0
- data/sig/ast/ruby/members.rbs +178 -0
- data/sig/buffer.rbs +63 -5
- data/sig/cli/diff.rbs +5 -11
- data/sig/cli/validate.rbs +12 -8
- data/sig/cli.rbs +18 -18
- data/sig/definition.rbs +6 -0
- data/sig/definition_builder.rbs +3 -1
- data/sig/environment/class_entry.rbs +50 -0
- data/sig/environment/module_entry.rbs +50 -0
- data/sig/environment.rbs +37 -81
- data/sig/errors.rbs +26 -20
- data/sig/inline_parser/comment_association.rbs +71 -0
- data/sig/inline_parser.rbs +124 -0
- data/sig/location.rbs +32 -7
- data/sig/locator.rbs +0 -2
- data/sig/method_builder.rbs +9 -4
- data/sig/namespace.rbs +0 -5
- data/sig/parser.rbs +47 -13
- data/sig/prototype/helpers.rbs +2 -0
- data/sig/resolver/type_name_resolver.rbs +0 -3
- data/sig/source.rbs +48 -0
- data/sig/type_param.rbs +13 -8
- data/sig/typename.rbs +0 -5
- data/sig/types.rbs +6 -7
- data/sig/unit_test/spy.rbs +0 -8
- data/sig/unit_test/type_assertions.rbs +11 -0
- data/src/ast.c +491 -143
- data/src/lexer.c +1552 -1314
- data/src/lexer.re +7 -0
- data/src/lexstate.c +8 -1
- data/src/location.c +8 -48
- data/src/parser.c +1107 -409
- data/src/util/rbs_constant_pool.c +0 -4
- data/stdlib/bigdecimal/0/big_decimal.rbs +16 -16
- data/stdlib/cgi-escape/0/escape.rbs +4 -4
- data/stdlib/coverage/0/coverage.rbs +4 -3
- data/stdlib/date/0/date.rbs +33 -28
- data/stdlib/date/0/date_time.rbs +24 -23
- data/stdlib/did_you_mean/0/did_you_mean.rbs +17 -16
- data/stdlib/digest/0/digest.rbs +110 -0
- data/stdlib/erb/0/erb.rbs +64 -53
- data/stdlib/etc/0/etc.rbs +55 -50
- data/stdlib/fileutils/0/fileutils.rbs +140 -126
- data/stdlib/forwardable/0/forwardable.rbs +10 -10
- data/stdlib/io-console/0/io-console.rbs +2 -2
- data/stdlib/json/0/json.rbs +158 -131
- data/stdlib/monitor/0/monitor.rbs +3 -3
- data/stdlib/net-http/0/net-http.rbs +159 -134
- data/stdlib/objspace/0/objspace.rbs +8 -30
- data/stdlib/open-uri/0/open-uri.rbs +8 -8
- data/stdlib/open3/0/open3.rbs +469 -10
- data/stdlib/openssl/0/openssl.rbs +144 -129
- data/stdlib/optparse/0/optparse.rbs +23 -14
- data/stdlib/pathname/0/pathname.rbs +2 -2
- data/stdlib/pp/0/pp.rbs +9 -8
- data/stdlib/prettyprint/0/prettyprint.rbs +7 -7
- data/stdlib/pstore/0/pstore.rbs +35 -30
- data/stdlib/psych/0/psych.rbs +62 -9
- data/stdlib/psych/0/store.rbs +2 -4
- data/stdlib/pty/0/pty.rbs +9 -6
- data/stdlib/random-formatter/0/random-formatter.rbs +277 -0
- data/stdlib/rdoc/0/code_object.rbs +2 -1
- data/stdlib/rdoc/0/parser.rbs +1 -1
- data/stdlib/rdoc/0/store.rbs +1 -1
- data/stdlib/ripper/0/ripper.rbs +20 -17
- data/stdlib/securerandom/0/manifest.yaml +2 -0
- data/stdlib/securerandom/0/securerandom.rbs +7 -20
- data/stdlib/shellwords/0/shellwords.rbs +2 -2
- data/stdlib/socket/0/addrinfo.rbs +9 -9
- data/stdlib/socket/0/basic_socket.rbs +3 -3
- data/stdlib/socket/0/ip_socket.rbs +10 -8
- data/stdlib/socket/0/socket.rbs +10 -9
- data/stdlib/socket/0/tcp_server.rbs +1 -1
- data/stdlib/socket/0/tcp_socket.rbs +1 -1
- data/stdlib/socket/0/udp_socket.rbs +1 -1
- data/stdlib/socket/0/unix_server.rbs +1 -1
- data/stdlib/stringio/0/stringio.rbs +55 -54
- data/stdlib/strscan/0/string_scanner.rbs +46 -44
- data/stdlib/tempfile/0/tempfile.rbs +24 -20
- data/stdlib/time/0/time.rbs +7 -5
- data/stdlib/tsort/0/tsort.rbs +7 -6
- data/stdlib/uri/0/common.rbs +31 -18
- data/stdlib/uri/0/file.rbs +2 -2
- data/stdlib/uri/0/generic.rbs +9 -2
- data/stdlib/uri/0/http.rbs +2 -2
- data/stdlib/uri/0/ldap.rbs +2 -2
- data/stdlib/uri/0/mailto.rbs +3 -3
- data/stdlib/uri/0/rfc2396_parser.rbs +6 -5
- data/stdlib/zlib/0/deflate.rbs +4 -3
- data/stdlib/zlib/0/gzip_reader.rbs +6 -6
- data/stdlib/zlib/0/gzip_writer.rbs +14 -12
- data/stdlib/zlib/0/inflate.rbs +1 -1
- data/stdlib/zlib/0/need_dict.rbs +1 -1
- metadata +66 -3
data/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,45 +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
|
-
|
|
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,
|
|
81
138
|
RBS_AST_SYMBOL,
|
|
82
139
|
};
|
|
83
140
|
|
|
84
141
|
typedef struct rbs_node {
|
|
85
142
|
enum rbs_node_type type;
|
|
86
|
-
|
|
143
|
+
rbs_location_range location;
|
|
87
144
|
} rbs_node_t;
|
|
88
145
|
|
|
89
146
|
const char *rbs_node_type_name(rbs_node_t *node);
|
|
@@ -154,10 +211,16 @@ typedef struct rbs_ast_declarations_class {
|
|
|
154
211
|
|
|
155
212
|
struct rbs_type_name *name;
|
|
156
213
|
struct rbs_node_list *type_params;
|
|
157
|
-
struct rbs_ast_declarations_class_super *super_class;
|
|
214
|
+
struct rbs_ast_declarations_class_super *super_class; /* Optional */
|
|
158
215
|
struct rbs_node_list *members;
|
|
159
216
|
struct rbs_node_list *annotations;
|
|
160
|
-
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 */
|
|
161
224
|
} rbs_ast_declarations_class_t;
|
|
162
225
|
|
|
163
226
|
typedef struct rbs_ast_declarations_class_super {
|
|
@@ -165,6 +228,9 @@ typedef struct rbs_ast_declarations_class_super {
|
|
|
165
228
|
|
|
166
229
|
struct rbs_type_name *name;
|
|
167
230
|
struct rbs_node_list *args;
|
|
231
|
+
|
|
232
|
+
rbs_location_range name_range; /* Required */
|
|
233
|
+
rbs_location_range args_range; /* Optional */
|
|
168
234
|
} rbs_ast_declarations_class_super_t;
|
|
169
235
|
|
|
170
236
|
typedef struct rbs_ast_declarations_class_alias {
|
|
@@ -172,8 +238,13 @@ typedef struct rbs_ast_declarations_class_alias {
|
|
|
172
238
|
|
|
173
239
|
struct rbs_type_name *new_name;
|
|
174
240
|
struct rbs_type_name *old_name;
|
|
175
|
-
struct rbs_ast_comment *comment;
|
|
241
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
176
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 */
|
|
177
248
|
} rbs_ast_declarations_class_alias_t;
|
|
178
249
|
|
|
179
250
|
typedef struct rbs_ast_declarations_constant {
|
|
@@ -181,8 +252,11 @@ typedef struct rbs_ast_declarations_constant {
|
|
|
181
252
|
|
|
182
253
|
struct rbs_type_name *name;
|
|
183
254
|
struct rbs_node *type;
|
|
184
|
-
struct rbs_ast_comment *comment;
|
|
255
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
185
256
|
struct rbs_node_list *annotations;
|
|
257
|
+
|
|
258
|
+
rbs_location_range name_range; /* Required */
|
|
259
|
+
rbs_location_range colon_range; /* Required */
|
|
186
260
|
} rbs_ast_declarations_constant_t;
|
|
187
261
|
|
|
188
262
|
typedef struct rbs_ast_declarations_global {
|
|
@@ -190,8 +264,11 @@ typedef struct rbs_ast_declarations_global {
|
|
|
190
264
|
|
|
191
265
|
struct rbs_ast_symbol *name;
|
|
192
266
|
struct rbs_node *type;
|
|
193
|
-
struct rbs_ast_comment *comment;
|
|
267
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
194
268
|
struct rbs_node_list *annotations;
|
|
269
|
+
|
|
270
|
+
rbs_location_range name_range; /* Required */
|
|
271
|
+
rbs_location_range colon_range; /* Required */
|
|
195
272
|
} rbs_ast_declarations_global_t;
|
|
196
273
|
|
|
197
274
|
typedef struct rbs_ast_declarations_interface {
|
|
@@ -201,7 +278,12 @@ typedef struct rbs_ast_declarations_interface {
|
|
|
201
278
|
struct rbs_node_list *type_params;
|
|
202
279
|
struct rbs_node_list *members;
|
|
203
280
|
struct rbs_node_list *annotations;
|
|
204
|
-
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 */
|
|
205
287
|
} rbs_ast_declarations_interface_t;
|
|
206
288
|
|
|
207
289
|
typedef struct rbs_ast_declarations_module {
|
|
@@ -212,7 +294,14 @@ typedef struct rbs_ast_declarations_module {
|
|
|
212
294
|
struct rbs_node_list *self_types;
|
|
213
295
|
struct rbs_node_list *members;
|
|
214
296
|
struct rbs_node_list *annotations;
|
|
215
|
-
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 */
|
|
216
305
|
} rbs_ast_declarations_module_t;
|
|
217
306
|
|
|
218
307
|
typedef struct rbs_ast_declarations_module_self {
|
|
@@ -220,6 +309,9 @@ typedef struct rbs_ast_declarations_module_self {
|
|
|
220
309
|
|
|
221
310
|
struct rbs_type_name *name;
|
|
222
311
|
struct rbs_node_list *args;
|
|
312
|
+
|
|
313
|
+
rbs_location_range name_range; /* Required */
|
|
314
|
+
rbs_location_range args_range; /* Optional */
|
|
223
315
|
} rbs_ast_declarations_module_self_t;
|
|
224
316
|
|
|
225
317
|
typedef struct rbs_ast_declarations_module_alias {
|
|
@@ -227,8 +319,13 @@ typedef struct rbs_ast_declarations_module_alias {
|
|
|
227
319
|
|
|
228
320
|
struct rbs_type_name *new_name;
|
|
229
321
|
struct rbs_type_name *old_name;
|
|
230
|
-
struct rbs_ast_comment *comment;
|
|
322
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
231
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 */
|
|
232
329
|
} rbs_ast_declarations_module_alias_t;
|
|
233
330
|
|
|
234
331
|
typedef struct rbs_ast_declarations_type_alias {
|
|
@@ -238,26 +335,40 @@ typedef struct rbs_ast_declarations_type_alias {
|
|
|
238
335
|
struct rbs_node_list *type_params;
|
|
239
336
|
struct rbs_node *type;
|
|
240
337
|
struct rbs_node_list *annotations;
|
|
241
|
-
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 */
|
|
242
344
|
} rbs_ast_declarations_type_alias_t;
|
|
243
345
|
|
|
244
346
|
typedef struct rbs_ast_directives_use {
|
|
245
347
|
rbs_node_t base;
|
|
246
348
|
|
|
247
349
|
struct rbs_node_list *clauses;
|
|
350
|
+
|
|
351
|
+
rbs_location_range keyword_range; /* Required */
|
|
248
352
|
} rbs_ast_directives_use_t;
|
|
249
353
|
|
|
250
354
|
typedef struct rbs_ast_directives_use_single_clause {
|
|
251
355
|
rbs_node_t base;
|
|
252
356
|
|
|
253
357
|
struct rbs_type_name *type_name;
|
|
254
|
-
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 */
|
|
255
363
|
} rbs_ast_directives_use_single_clause_t;
|
|
256
364
|
|
|
257
365
|
typedef struct rbs_ast_directives_use_wildcard_clause {
|
|
258
366
|
rbs_node_t base;
|
|
259
367
|
|
|
260
368
|
struct rbs_namespace *rbs_namespace;
|
|
369
|
+
|
|
370
|
+
rbs_location_range namespace_range; /* Required */
|
|
371
|
+
rbs_location_range star_range; /* Required */
|
|
261
372
|
} rbs_ast_directives_use_wildcard_clause_t;
|
|
262
373
|
|
|
263
374
|
typedef struct rbs_ast_integer {
|
|
@@ -271,9 +382,15 @@ typedef struct rbs_ast_members_alias {
|
|
|
271
382
|
|
|
272
383
|
struct rbs_ast_symbol *new_name;
|
|
273
384
|
struct rbs_ast_symbol *old_name;
|
|
274
|
-
|
|
385
|
+
enum rbs_alias_kind kind;
|
|
275
386
|
struct rbs_node_list *annotations;
|
|
276
|
-
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 */
|
|
277
394
|
} rbs_ast_members_alias_t;
|
|
278
395
|
|
|
279
396
|
typedef struct rbs_ast_members_attr_accessor {
|
|
@@ -281,11 +398,19 @@ typedef struct rbs_ast_members_attr_accessor {
|
|
|
281
398
|
|
|
282
399
|
struct rbs_ast_symbol *name;
|
|
283
400
|
struct rbs_node *type;
|
|
284
|
-
|
|
285
|
-
|
|
401
|
+
rbs_attr_ivar_name_t ivar_name;
|
|
402
|
+
enum rbs_attribute_kind kind;
|
|
286
403
|
struct rbs_node_list *annotations;
|
|
287
|
-
struct rbs_ast_comment *comment;
|
|
288
|
-
|
|
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 */
|
|
289
414
|
} rbs_ast_members_attr_accessor_t;
|
|
290
415
|
|
|
291
416
|
typedef struct rbs_ast_members_attr_reader {
|
|
@@ -293,11 +418,19 @@ typedef struct rbs_ast_members_attr_reader {
|
|
|
293
418
|
|
|
294
419
|
struct rbs_ast_symbol *name;
|
|
295
420
|
struct rbs_node *type;
|
|
296
|
-
|
|
297
|
-
|
|
421
|
+
rbs_attr_ivar_name_t ivar_name;
|
|
422
|
+
enum rbs_attribute_kind kind;
|
|
298
423
|
struct rbs_node_list *annotations;
|
|
299
|
-
struct rbs_ast_comment *comment;
|
|
300
|
-
|
|
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 */
|
|
301
434
|
} rbs_ast_members_attr_reader_t;
|
|
302
435
|
|
|
303
436
|
typedef struct rbs_ast_members_attr_writer {
|
|
@@ -305,11 +438,19 @@ typedef struct rbs_ast_members_attr_writer {
|
|
|
305
438
|
|
|
306
439
|
struct rbs_ast_symbol *name;
|
|
307
440
|
struct rbs_node *type;
|
|
308
|
-
|
|
309
|
-
|
|
441
|
+
rbs_attr_ivar_name_t ivar_name;
|
|
442
|
+
enum rbs_attribute_kind kind;
|
|
310
443
|
struct rbs_node_list *annotations;
|
|
311
|
-
struct rbs_ast_comment *comment;
|
|
312
|
-
|
|
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 */
|
|
313
454
|
} rbs_ast_members_attr_writer_t;
|
|
314
455
|
|
|
315
456
|
typedef struct rbs_ast_members_class_instance_variable {
|
|
@@ -317,7 +458,11 @@ typedef struct rbs_ast_members_class_instance_variable {
|
|
|
317
458
|
|
|
318
459
|
struct rbs_ast_symbol *name;
|
|
319
460
|
struct rbs_node *type;
|
|
320
|
-
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 */
|
|
321
466
|
} rbs_ast_members_class_instance_variable_t;
|
|
322
467
|
|
|
323
468
|
typedef struct rbs_ast_members_class_variable {
|
|
@@ -325,7 +470,11 @@ typedef struct rbs_ast_members_class_variable {
|
|
|
325
470
|
|
|
326
471
|
struct rbs_ast_symbol *name;
|
|
327
472
|
struct rbs_node *type;
|
|
328
|
-
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 */
|
|
329
478
|
} rbs_ast_members_class_variable_t;
|
|
330
479
|
|
|
331
480
|
typedef struct rbs_ast_members_extend {
|
|
@@ -334,7 +483,11 @@ typedef struct rbs_ast_members_extend {
|
|
|
334
483
|
struct rbs_type_name *name;
|
|
335
484
|
struct rbs_node_list *args;
|
|
336
485
|
struct rbs_node_list *annotations;
|
|
337
|
-
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 */
|
|
338
491
|
} rbs_ast_members_extend_t;
|
|
339
492
|
|
|
340
493
|
typedef struct rbs_ast_members_include {
|
|
@@ -343,7 +496,11 @@ typedef struct rbs_ast_members_include {
|
|
|
343
496
|
struct rbs_type_name *name;
|
|
344
497
|
struct rbs_node_list *args;
|
|
345
498
|
struct rbs_node_list *annotations;
|
|
346
|
-
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 */
|
|
347
504
|
} rbs_ast_members_include_t;
|
|
348
505
|
|
|
349
506
|
typedef struct rbs_ast_members_instance_variable {
|
|
@@ -351,19 +508,29 @@ typedef struct rbs_ast_members_instance_variable {
|
|
|
351
508
|
|
|
352
509
|
struct rbs_ast_symbol *name;
|
|
353
510
|
struct rbs_node *type;
|
|
354
|
-
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 */
|
|
355
516
|
} rbs_ast_members_instance_variable_t;
|
|
356
517
|
|
|
357
518
|
typedef struct rbs_ast_members_method_definition {
|
|
358
519
|
rbs_node_t base;
|
|
359
520
|
|
|
360
521
|
struct rbs_ast_symbol *name;
|
|
361
|
-
|
|
522
|
+
enum rbs_method_definition_kind kind;
|
|
362
523
|
struct rbs_node_list *overloads;
|
|
363
524
|
struct rbs_node_list *annotations;
|
|
364
|
-
struct rbs_ast_comment *comment;
|
|
525
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
365
526
|
bool overloading;
|
|
366
|
-
|
|
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 */
|
|
367
534
|
} rbs_ast_members_method_definition_t;
|
|
368
535
|
|
|
369
536
|
typedef struct rbs_ast_members_method_definition_overload {
|
|
@@ -379,7 +546,11 @@ typedef struct rbs_ast_members_prepend {
|
|
|
379
546
|
struct rbs_type_name *name;
|
|
380
547
|
struct rbs_node_list *args;
|
|
381
548
|
struct rbs_node_list *annotations;
|
|
382
|
-
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 */
|
|
383
554
|
} rbs_ast_members_prepend_t;
|
|
384
555
|
|
|
385
556
|
typedef struct rbs_ast_members_private {
|
|
@@ -392,6 +563,131 @@ typedef struct rbs_ast_members_public {
|
|
|
392
563
|
|
|
393
564
|
} rbs_ast_members_public_t;
|
|
394
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
|
+
|
|
588
|
+
typedef struct rbs_ast_ruby_annotations_colon_method_type_annotation {
|
|
589
|
+
rbs_node_t base;
|
|
590
|
+
|
|
591
|
+
rbs_location_range prefix_location;
|
|
592
|
+
struct rbs_node_list *annotations;
|
|
593
|
+
struct rbs_node *method_type;
|
|
594
|
+
} rbs_ast_ruby_annotations_colon_method_type_annotation_t;
|
|
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
|
+
|
|
618
|
+
typedef struct rbs_ast_ruby_annotations_method_types_annotation {
|
|
619
|
+
rbs_node_t base;
|
|
620
|
+
|
|
621
|
+
rbs_location_range prefix_location;
|
|
622
|
+
struct rbs_node_list *overloads;
|
|
623
|
+
rbs_location_range_list_t *vertical_bar_locations;
|
|
624
|
+
rbs_location_range dot3_location; /* Optional */
|
|
625
|
+
} rbs_ast_ruby_annotations_method_types_annotation_t;
|
|
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
|
+
|
|
636
|
+
typedef struct rbs_ast_ruby_annotations_node_type_assertion {
|
|
637
|
+
rbs_node_t base;
|
|
638
|
+
|
|
639
|
+
rbs_location_range prefix_location;
|
|
640
|
+
struct rbs_node *type;
|
|
641
|
+
} rbs_ast_ruby_annotations_node_type_assertion_t;
|
|
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
|
+
|
|
653
|
+
typedef struct rbs_ast_ruby_annotations_return_type_annotation {
|
|
654
|
+
rbs_node_t base;
|
|
655
|
+
|
|
656
|
+
rbs_location_range prefix_location;
|
|
657
|
+
rbs_location_range return_location;
|
|
658
|
+
rbs_location_range colon_location;
|
|
659
|
+
struct rbs_node *return_type;
|
|
660
|
+
rbs_location_range comment_location; /* Optional */
|
|
661
|
+
} rbs_ast_ruby_annotations_return_type_annotation_t;
|
|
662
|
+
|
|
663
|
+
typedef struct rbs_ast_ruby_annotations_skip_annotation {
|
|
664
|
+
rbs_node_t base;
|
|
665
|
+
|
|
666
|
+
rbs_location_range prefix_location;
|
|
667
|
+
rbs_location_range skip_location;
|
|
668
|
+
rbs_location_range comment_location; /* Optional */
|
|
669
|
+
} rbs_ast_ruby_annotations_skip_annotation_t;
|
|
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
|
+
|
|
395
691
|
typedef struct rbs_ast_string {
|
|
396
692
|
rbs_node_t base;
|
|
397
693
|
|
|
@@ -402,10 +698,18 @@ typedef struct rbs_ast_type_param {
|
|
|
402
698
|
rbs_node_t base;
|
|
403
699
|
|
|
404
700
|
struct rbs_ast_symbol *name;
|
|
405
|
-
|
|
406
|
-
struct rbs_node *upper_bound;
|
|
407
|
-
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 */
|
|
408
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 */
|
|
409
713
|
} rbs_ast_type_param_t;
|
|
410
714
|
|
|
411
715
|
typedef struct rbs_method_type {
|
|
@@ -413,7 +717,10 @@ typedef struct rbs_method_type {
|
|
|
413
717
|
|
|
414
718
|
struct rbs_node_list *type_params;
|
|
415
719
|
struct rbs_node *type;
|
|
416
|
-
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 */
|
|
417
724
|
} rbs_method_type_t;
|
|
418
725
|
|
|
419
726
|
typedef struct rbs_namespace {
|
|
@@ -442,6 +749,9 @@ typedef struct rbs_types_alias {
|
|
|
442
749
|
|
|
443
750
|
struct rbs_type_name *name;
|
|
444
751
|
struct rbs_node_list *args;
|
|
752
|
+
|
|
753
|
+
rbs_location_range name_range; /* Required */
|
|
754
|
+
rbs_location_range args_range; /* Optional */
|
|
445
755
|
} rbs_types_alias_t;
|
|
446
756
|
|
|
447
757
|
typedef struct rbs_types_bases_any {
|
|
@@ -495,7 +805,7 @@ typedef struct rbs_types_block {
|
|
|
495
805
|
|
|
496
806
|
struct rbs_node *type;
|
|
497
807
|
bool required;
|
|
498
|
-
struct rbs_node *self_type;
|
|
808
|
+
struct rbs_node *self_type; /* Optional */
|
|
499
809
|
} rbs_types_block_t;
|
|
500
810
|
|
|
501
811
|
typedef struct rbs_types_class_instance {
|
|
@@ -503,12 +813,19 @@ typedef struct rbs_types_class_instance {
|
|
|
503
813
|
|
|
504
814
|
struct rbs_type_name *name;
|
|
505
815
|
struct rbs_node_list *args;
|
|
816
|
+
|
|
817
|
+
rbs_location_range name_range; /* Required */
|
|
818
|
+
rbs_location_range args_range; /* Optional */
|
|
506
819
|
} rbs_types_class_instance_t;
|
|
507
820
|
|
|
508
821
|
typedef struct rbs_types_class_singleton {
|
|
509
822
|
rbs_node_t base;
|
|
510
823
|
|
|
511
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 */
|
|
512
829
|
} rbs_types_class_singleton_t;
|
|
513
830
|
|
|
514
831
|
typedef struct rbs_types_function {
|
|
@@ -516,11 +833,11 @@ typedef struct rbs_types_function {
|
|
|
516
833
|
|
|
517
834
|
struct rbs_node_list *required_positionals;
|
|
518
835
|
struct rbs_node_list *optional_positionals;
|
|
519
|
-
struct rbs_node *rest_positionals;
|
|
836
|
+
struct rbs_node *rest_positionals; /* Optional */
|
|
520
837
|
struct rbs_node_list *trailing_positionals;
|
|
521
838
|
struct rbs_hash *required_keywords;
|
|
522
839
|
struct rbs_hash *optional_keywords;
|
|
523
|
-
struct rbs_node *rest_keywords;
|
|
840
|
+
struct rbs_node *rest_keywords; /* Optional */
|
|
524
841
|
struct rbs_node *return_type;
|
|
525
842
|
} rbs_types_function_t;
|
|
526
843
|
|
|
@@ -528,7 +845,9 @@ typedef struct rbs_types_function_param {
|
|
|
528
845
|
rbs_node_t base;
|
|
529
846
|
|
|
530
847
|
struct rbs_node *type;
|
|
531
|
-
struct rbs_ast_symbol *name;
|
|
848
|
+
struct rbs_ast_symbol *name; /* Optional */
|
|
849
|
+
|
|
850
|
+
rbs_location_range name_range; /* Optional */
|
|
532
851
|
} rbs_types_function_param_t;
|
|
533
852
|
|
|
534
853
|
typedef struct rbs_types_interface {
|
|
@@ -536,6 +855,9 @@ typedef struct rbs_types_interface {
|
|
|
536
855
|
|
|
537
856
|
struct rbs_type_name *name;
|
|
538
857
|
struct rbs_node_list *args;
|
|
858
|
+
|
|
859
|
+
rbs_location_range name_range; /* Required */
|
|
860
|
+
rbs_location_range args_range; /* Optional */
|
|
539
861
|
} rbs_types_interface_t;
|
|
540
862
|
|
|
541
863
|
typedef struct rbs_types_intersection {
|
|
@@ -560,8 +882,8 @@ typedef struct rbs_types_proc {
|
|
|
560
882
|
rbs_node_t base;
|
|
561
883
|
|
|
562
884
|
struct rbs_node *type;
|
|
563
|
-
struct rbs_types_block *block;
|
|
564
|
-
struct rbs_node *self_type;
|
|
885
|
+
struct rbs_types_block *block; /* Optional */
|
|
886
|
+
struct rbs_node *self_type; /* Optional */
|
|
565
887
|
} rbs_types_proc_t;
|
|
566
888
|
|
|
567
889
|
typedef struct rbs_types_record {
|
|
@@ -601,15 +923,15 @@ typedef struct rbs_types_variable {
|
|
|
601
923
|
struct rbs_ast_symbol *name;
|
|
602
924
|
} rbs_types_variable_t;
|
|
603
925
|
|
|
604
|
-
|
|
605
|
-
/// These are stored in the global constant pool, and get surfaced to Ruby as `Symbol`s,
|
|
606
|
-
/// just like `rbs_ast_symbol_t`s.
|
|
607
|
-
typedef struct rbs_keyword {
|
|
926
|
+
typedef union rbs_ast_ruby_annotations {
|
|
608
927
|
rbs_node_t base;
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
928
|
+
rbs_ast_ruby_annotations_colon_method_type_annotation_t colon_method_type_annotation;
|
|
929
|
+
rbs_ast_ruby_annotations_method_types_annotation_t method_types_annotation;
|
|
930
|
+
rbs_ast_ruby_annotations_node_type_assertion_t node_type_assertion;
|
|
931
|
+
rbs_ast_ruby_annotations_return_type_annotation_t return_type_annotation;
|
|
932
|
+
rbs_ast_ruby_annotations_skip_annotation_t skip_annotation;
|
|
933
|
+
rbs_ast_ruby_annotations_param_type_annotation_t param_type_annotation;
|
|
934
|
+
} rbs_ast_ruby_annotations_t;
|
|
613
935
|
|
|
614
936
|
/// `rbs_ast_symbol_t` models user-defined identifiers like class names, method names, etc.
|
|
615
937
|
/// These get stored in the parser's own constant pool, and get surfaced to Ruby as `Symbol`s.
|
|
@@ -618,70 +940,83 @@ typedef struct rbs_ast_symbol {
|
|
|
618
940
|
rbs_constant_id_t constant_id;
|
|
619
941
|
} rbs_ast_symbol_t;
|
|
620
942
|
|
|
621
|
-
rbs_ast_symbol_t *rbs_ast_symbol_new(rbs_allocator_t *,
|
|
622
|
-
|
|
623
|
-
rbs_ast_annotation_t *rbs_ast_annotation_new(rbs_allocator_t *allocator,
|
|
624
|
-
rbs_ast_bool_t *rbs_ast_bool_new(rbs_allocator_t *allocator,
|
|
625
|
-
rbs_ast_comment_t *rbs_ast_comment_new(rbs_allocator_t *allocator,
|
|
626
|
-
rbs_ast_declarations_class_t *rbs_ast_declarations_class_new(rbs_allocator_t *allocator,
|
|
627
|
-
rbs_ast_declarations_class_super_t *rbs_ast_declarations_class_super_new(rbs_allocator_t *allocator,
|
|
628
|
-
rbs_ast_declarations_class_alias_t *rbs_ast_declarations_class_alias_new(rbs_allocator_t *allocator,
|
|
629
|
-
rbs_ast_declarations_constant_t *rbs_ast_declarations_constant_new(rbs_allocator_t *allocator,
|
|
630
|
-
rbs_ast_declarations_global_t *rbs_ast_declarations_global_new(rbs_allocator_t *allocator,
|
|
631
|
-
rbs_ast_declarations_interface_t *rbs_ast_declarations_interface_new(rbs_allocator_t *allocator,
|
|
632
|
-
rbs_ast_declarations_module_t *rbs_ast_declarations_module_new(rbs_allocator_t *allocator,
|
|
633
|
-
rbs_ast_declarations_module_self_t *rbs_ast_declarations_module_self_new(rbs_allocator_t *allocator,
|
|
634
|
-
rbs_ast_declarations_module_alias_t *rbs_ast_declarations_module_alias_new(rbs_allocator_t *allocator,
|
|
635
|
-
rbs_ast_declarations_type_alias_t *rbs_ast_declarations_type_alias_new(rbs_allocator_t *allocator,
|
|
636
|
-
rbs_ast_directives_use_t *rbs_ast_directives_use_new(rbs_allocator_t *allocator,
|
|
637
|
-
rbs_ast_directives_use_single_clause_t *rbs_ast_directives_use_single_clause_new(rbs_allocator_t *allocator,
|
|
638
|
-
rbs_ast_directives_use_wildcard_clause_t *rbs_ast_directives_use_wildcard_clause_new(rbs_allocator_t *allocator,
|
|
639
|
-
rbs_ast_integer_t *rbs_ast_integer_new(rbs_allocator_t *allocator,
|
|
640
|
-
rbs_ast_members_alias_t *rbs_ast_members_alias_new(rbs_allocator_t *allocator,
|
|
641
|
-
rbs_ast_members_attr_accessor_t *rbs_ast_members_attr_accessor_new(rbs_allocator_t *allocator,
|
|
642
|
-
rbs_ast_members_attr_reader_t *rbs_ast_members_attr_reader_new(rbs_allocator_t *allocator,
|
|
643
|
-
rbs_ast_members_attr_writer_t *rbs_ast_members_attr_writer_new(rbs_allocator_t *allocator,
|
|
644
|
-
rbs_ast_members_class_instance_variable_t *rbs_ast_members_class_instance_variable_new(rbs_allocator_t *allocator,
|
|
645
|
-
rbs_ast_members_class_variable_t *rbs_ast_members_class_variable_new(rbs_allocator_t *allocator,
|
|
646
|
-
rbs_ast_members_extend_t *rbs_ast_members_extend_new(rbs_allocator_t *allocator,
|
|
647
|
-
rbs_ast_members_include_t *rbs_ast_members_include_new(rbs_allocator_t *allocator,
|
|
648
|
-
rbs_ast_members_instance_variable_t *rbs_ast_members_instance_variable_new(rbs_allocator_t *allocator,
|
|
649
|
-
rbs_ast_members_method_definition_t *rbs_ast_members_method_definition_new(rbs_allocator_t *allocator,
|
|
650
|
-
rbs_ast_members_method_definition_overload_t *rbs_ast_members_method_definition_overload_new(rbs_allocator_t *allocator,
|
|
651
|
-
rbs_ast_members_prepend_t *rbs_ast_members_prepend_new(rbs_allocator_t *allocator,
|
|
652
|
-
rbs_ast_members_private_t *rbs_ast_members_private_new(rbs_allocator_t *allocator,
|
|
653
|
-
rbs_ast_members_public_t *rbs_ast_members_public_new(rbs_allocator_t *allocator,
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
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);
|
|
686
1021
|
|
|
687
1022
|
#endif
|