rbs 4.0.0.dev.5 → 4.0.1.dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.clang-format +1 -0
- data/.github/workflows/c-check.yml +8 -4
- data/.github/workflows/comments.yml +3 -1
- data/.github/workflows/dependabot.yml +1 -1
- data/.github/workflows/ruby.yml +10 -0
- data/.github/workflows/rust.yml +95 -0
- data/CHANGELOG.md +323 -0
- data/Rakefile +12 -29
- data/Steepfile +1 -0
- data/config.yml +393 -37
- data/core/array.rbs +218 -188
- data/core/basic_object.rbs +9 -8
- data/core/class.rbs +6 -5
- data/core/comparable.rbs +45 -31
- data/core/complex.rbs +52 -40
- data/core/dir.rbs +57 -45
- data/core/encoding.rbs +5 -5
- data/core/enumerable.rbs +96 -91
- data/core/enumerator.rbs +4 -3
- data/core/errno.rbs +3 -2
- data/core/errors.rbs +31 -29
- data/core/exception.rbs +12 -12
- data/core/fiber.rbs +36 -36
- data/core/file.rbs +186 -113
- data/core/file_test.rbs +2 -2
- data/core/float.rbs +41 -32
- data/core/gc.rbs +78 -70
- data/core/hash.rbs +70 -60
- data/core/integer.rbs +32 -28
- data/core/io/buffer.rbs +36 -36
- data/core/io/wait.rbs +7 -7
- data/core/io.rbs +120 -135
- data/core/kernel.rbs +189 -139
- data/core/marshal.rbs +3 -3
- data/core/match_data.rbs +14 -12
- data/core/math.rbs +69 -67
- data/core/method.rbs +6 -6
- data/core/module.rbs +146 -85
- data/core/nil_class.rbs +4 -3
- data/core/numeric.rbs +35 -32
- data/core/object.rbs +6 -8
- data/core/object_space.rbs +11 -10
- data/core/pathname.rbs +131 -81
- data/core/proc.rbs +65 -33
- data/core/process.rbs +219 -201
- data/core/ractor.rbs +15 -11
- data/core/random.rbs +4 -3
- data/core/range.rbs +52 -47
- data/core/rational.rbs +5 -5
- 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 -5
- 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 +311 -292
- data/core/struct.rbs +26 -25
- data/core/symbol.rbs +25 -24
- data/core/thread.rbs +40 -34
- 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 +110 -4
- data/docs/syntax.md +13 -12
- data/ext/rbs_extension/ast_translation.c +489 -135
- data/ext/rbs_extension/class_constants.c +8 -0
- data/ext/rbs_extension/class_constants.h +4 -0
- data/ext/rbs_extension/legacy_location.c +28 -51
- data/ext/rbs_extension/legacy_location.h +37 -0
- data/ext/rbs_extension/main.c +12 -20
- data/include/rbs/ast.h +423 -195
- data/include/rbs/lexer.h +2 -2
- data/include/rbs/location.h +25 -44
- data/include/rbs/parser.h +2 -2
- data/include/rbs/util/rbs_constant_pool.h +0 -3
- data/include/rbs.h +8 -0
- data/lib/rbs/ast/ruby/annotations.rb +157 -4
- data/lib/rbs/ast/ruby/members.rb +374 -22
- data/lib/rbs/cli/validate.rb +5 -60
- data/lib/rbs/collection/config/lockfile_generator.rb +6 -2
- data/lib/rbs/definition_builder.rb +60 -27
- data/lib/rbs/errors.rb +0 -11
- data/lib/rbs/inline_parser.rb +1 -1
- data/lib/rbs/parser_aux.rb +20 -7
- data/lib/rbs/prototype/helpers.rb +57 -0
- data/lib/rbs/prototype/rb.rb +1 -26
- data/lib/rbs/prototype/rbi.rb +1 -20
- data/lib/rbs/test/type_check.rb +3 -0
- data/lib/rbs/types.rb +62 -52
- data/lib/rbs/unit_test/type_assertions.rb +35 -8
- data/lib/rbs/version.rb +1 -1
- data/lib/rbs.rb +0 -1
- data/rbs.gemspec +1 -1
- 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/sig/ast/ruby/annotations.rbs +191 -4
- data/sig/ast/ruby/members.rbs +21 -1
- data/sig/cli/validate.rbs +1 -6
- data/sig/definition_builder.rbs +2 -0
- data/sig/errors.rbs +0 -8
- data/sig/method_types.rbs +1 -1
- data/sig/parser.rbs +17 -13
- data/sig/prototype/helpers.rbs +2 -0
- data/sig/types.rbs +10 -11
- data/sig/unit_test/spy.rbs +0 -8
- data/sig/unit_test/type_assertions.rbs +11 -0
- data/src/ast.c +339 -161
- data/src/lexstate.c +1 -1
- data/src/location.c +7 -47
- data/src/parser.c +674 -480
- 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/erb/0/erb.rbs +64 -53
- data/stdlib/etc/0/etc.rbs +55 -50
- data/stdlib/fileutils/0/fileutils.rbs +138 -125
- data/stdlib/forwardable/0/forwardable.rbs +10 -10
- data/stdlib/io-console/0/io-console.rbs +2 -2
- data/stdlib/json/0/json.rbs +135 -108
- 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 -7
- data/stdlib/open-uri/0/open-uri.rbs +8 -8
- data/stdlib/open3/0/open3.rbs +36 -35
- data/stdlib/openssl/0/openssl.rbs +144 -129
- data/stdlib/optparse/0/optparse.rbs +18 -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 +61 -8
- data/stdlib/psych/0/store.rbs +2 -4
- data/stdlib/pty/0/pty.rbs +9 -6
- data/stdlib/random-formatter/0/random-formatter.rbs +2 -2
- data/stdlib/ripper/0/ripper.rbs +20 -17
- data/stdlib/securerandom/0/securerandom.rbs +1 -1
- data/stdlib/shellwords/0/shellwords.rbs +2 -2
- 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 +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 +26 -18
- data/stdlib/uri/0/file.rbs +2 -2
- data/stdlib/uri/0/generic.rbs +2 -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 +4 -4
- 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 +23 -5
- data/.github/workflows/valgrind.yml +0 -42
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,54 +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
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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,
|
|
90
138
|
RBS_AST_SYMBOL,
|
|
91
139
|
};
|
|
92
140
|
|
|
93
141
|
typedef struct rbs_node {
|
|
94
142
|
enum rbs_node_type type;
|
|
95
|
-
|
|
143
|
+
rbs_location_range location;
|
|
96
144
|
} rbs_node_t;
|
|
97
145
|
|
|
98
146
|
const char *rbs_node_type_name(rbs_node_t *node);
|
|
@@ -163,10 +211,16 @@ typedef struct rbs_ast_declarations_class {
|
|
|
163
211
|
|
|
164
212
|
struct rbs_type_name *name;
|
|
165
213
|
struct rbs_node_list *type_params;
|
|
166
|
-
struct rbs_ast_declarations_class_super *super_class;
|
|
214
|
+
struct rbs_ast_declarations_class_super *super_class; /* Optional */
|
|
167
215
|
struct rbs_node_list *members;
|
|
168
216
|
struct rbs_node_list *annotations;
|
|
169
|
-
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 */
|
|
170
224
|
} rbs_ast_declarations_class_t;
|
|
171
225
|
|
|
172
226
|
typedef struct rbs_ast_declarations_class_super {
|
|
@@ -174,6 +228,9 @@ typedef struct rbs_ast_declarations_class_super {
|
|
|
174
228
|
|
|
175
229
|
struct rbs_type_name *name;
|
|
176
230
|
struct rbs_node_list *args;
|
|
231
|
+
|
|
232
|
+
rbs_location_range name_range; /* Required */
|
|
233
|
+
rbs_location_range args_range; /* Optional */
|
|
177
234
|
} rbs_ast_declarations_class_super_t;
|
|
178
235
|
|
|
179
236
|
typedef struct rbs_ast_declarations_class_alias {
|
|
@@ -181,8 +238,13 @@ typedef struct rbs_ast_declarations_class_alias {
|
|
|
181
238
|
|
|
182
239
|
struct rbs_type_name *new_name;
|
|
183
240
|
struct rbs_type_name *old_name;
|
|
184
|
-
struct rbs_ast_comment *comment;
|
|
241
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
185
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 */
|
|
186
248
|
} rbs_ast_declarations_class_alias_t;
|
|
187
249
|
|
|
188
250
|
typedef struct rbs_ast_declarations_constant {
|
|
@@ -190,8 +252,11 @@ typedef struct rbs_ast_declarations_constant {
|
|
|
190
252
|
|
|
191
253
|
struct rbs_type_name *name;
|
|
192
254
|
struct rbs_node *type;
|
|
193
|
-
struct rbs_ast_comment *comment;
|
|
255
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
194
256
|
struct rbs_node_list *annotations;
|
|
257
|
+
|
|
258
|
+
rbs_location_range name_range; /* Required */
|
|
259
|
+
rbs_location_range colon_range; /* Required */
|
|
195
260
|
} rbs_ast_declarations_constant_t;
|
|
196
261
|
|
|
197
262
|
typedef struct rbs_ast_declarations_global {
|
|
@@ -199,8 +264,11 @@ typedef struct rbs_ast_declarations_global {
|
|
|
199
264
|
|
|
200
265
|
struct rbs_ast_symbol *name;
|
|
201
266
|
struct rbs_node *type;
|
|
202
|
-
struct rbs_ast_comment *comment;
|
|
267
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
203
268
|
struct rbs_node_list *annotations;
|
|
269
|
+
|
|
270
|
+
rbs_location_range name_range; /* Required */
|
|
271
|
+
rbs_location_range colon_range; /* Required */
|
|
204
272
|
} rbs_ast_declarations_global_t;
|
|
205
273
|
|
|
206
274
|
typedef struct rbs_ast_declarations_interface {
|
|
@@ -210,7 +278,12 @@ typedef struct rbs_ast_declarations_interface {
|
|
|
210
278
|
struct rbs_node_list *type_params;
|
|
211
279
|
struct rbs_node_list *members;
|
|
212
280
|
struct rbs_node_list *annotations;
|
|
213
|
-
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 */
|
|
214
287
|
} rbs_ast_declarations_interface_t;
|
|
215
288
|
|
|
216
289
|
typedef struct rbs_ast_declarations_module {
|
|
@@ -221,7 +294,14 @@ typedef struct rbs_ast_declarations_module {
|
|
|
221
294
|
struct rbs_node_list *self_types;
|
|
222
295
|
struct rbs_node_list *members;
|
|
223
296
|
struct rbs_node_list *annotations;
|
|
224
|
-
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 */
|
|
225
305
|
} rbs_ast_declarations_module_t;
|
|
226
306
|
|
|
227
307
|
typedef struct rbs_ast_declarations_module_self {
|
|
@@ -229,6 +309,9 @@ typedef struct rbs_ast_declarations_module_self {
|
|
|
229
309
|
|
|
230
310
|
struct rbs_type_name *name;
|
|
231
311
|
struct rbs_node_list *args;
|
|
312
|
+
|
|
313
|
+
rbs_location_range name_range; /* Required */
|
|
314
|
+
rbs_location_range args_range; /* Optional */
|
|
232
315
|
} rbs_ast_declarations_module_self_t;
|
|
233
316
|
|
|
234
317
|
typedef struct rbs_ast_declarations_module_alias {
|
|
@@ -236,8 +319,13 @@ typedef struct rbs_ast_declarations_module_alias {
|
|
|
236
319
|
|
|
237
320
|
struct rbs_type_name *new_name;
|
|
238
321
|
struct rbs_type_name *old_name;
|
|
239
|
-
struct rbs_ast_comment *comment;
|
|
322
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
240
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 */
|
|
241
329
|
} rbs_ast_declarations_module_alias_t;
|
|
242
330
|
|
|
243
331
|
typedef struct rbs_ast_declarations_type_alias {
|
|
@@ -247,26 +335,40 @@ typedef struct rbs_ast_declarations_type_alias {
|
|
|
247
335
|
struct rbs_node_list *type_params;
|
|
248
336
|
struct rbs_node *type;
|
|
249
337
|
struct rbs_node_list *annotations;
|
|
250
|
-
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 */
|
|
251
344
|
} rbs_ast_declarations_type_alias_t;
|
|
252
345
|
|
|
253
346
|
typedef struct rbs_ast_directives_use {
|
|
254
347
|
rbs_node_t base;
|
|
255
348
|
|
|
256
349
|
struct rbs_node_list *clauses;
|
|
350
|
+
|
|
351
|
+
rbs_location_range keyword_range; /* Required */
|
|
257
352
|
} rbs_ast_directives_use_t;
|
|
258
353
|
|
|
259
354
|
typedef struct rbs_ast_directives_use_single_clause {
|
|
260
355
|
rbs_node_t base;
|
|
261
356
|
|
|
262
357
|
struct rbs_type_name *type_name;
|
|
263
|
-
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 */
|
|
264
363
|
} rbs_ast_directives_use_single_clause_t;
|
|
265
364
|
|
|
266
365
|
typedef struct rbs_ast_directives_use_wildcard_clause {
|
|
267
366
|
rbs_node_t base;
|
|
268
367
|
|
|
269
368
|
struct rbs_namespace *rbs_namespace;
|
|
369
|
+
|
|
370
|
+
rbs_location_range namespace_range; /* Required */
|
|
371
|
+
rbs_location_range star_range; /* Required */
|
|
270
372
|
} rbs_ast_directives_use_wildcard_clause_t;
|
|
271
373
|
|
|
272
374
|
typedef struct rbs_ast_integer {
|
|
@@ -280,9 +382,15 @@ typedef struct rbs_ast_members_alias {
|
|
|
280
382
|
|
|
281
383
|
struct rbs_ast_symbol *new_name;
|
|
282
384
|
struct rbs_ast_symbol *old_name;
|
|
283
|
-
|
|
385
|
+
enum rbs_alias_kind kind;
|
|
284
386
|
struct rbs_node_list *annotations;
|
|
285
|
-
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 */
|
|
286
394
|
} rbs_ast_members_alias_t;
|
|
287
395
|
|
|
288
396
|
typedef struct rbs_ast_members_attr_accessor {
|
|
@@ -290,11 +398,19 @@ typedef struct rbs_ast_members_attr_accessor {
|
|
|
290
398
|
|
|
291
399
|
struct rbs_ast_symbol *name;
|
|
292
400
|
struct rbs_node *type;
|
|
293
|
-
|
|
294
|
-
|
|
401
|
+
rbs_attr_ivar_name_t ivar_name;
|
|
402
|
+
enum rbs_attribute_kind kind;
|
|
295
403
|
struct rbs_node_list *annotations;
|
|
296
|
-
struct rbs_ast_comment *comment;
|
|
297
|
-
|
|
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 */
|
|
298
414
|
} rbs_ast_members_attr_accessor_t;
|
|
299
415
|
|
|
300
416
|
typedef struct rbs_ast_members_attr_reader {
|
|
@@ -302,11 +418,19 @@ typedef struct rbs_ast_members_attr_reader {
|
|
|
302
418
|
|
|
303
419
|
struct rbs_ast_symbol *name;
|
|
304
420
|
struct rbs_node *type;
|
|
305
|
-
|
|
306
|
-
|
|
421
|
+
rbs_attr_ivar_name_t ivar_name;
|
|
422
|
+
enum rbs_attribute_kind kind;
|
|
307
423
|
struct rbs_node_list *annotations;
|
|
308
|
-
struct rbs_ast_comment *comment;
|
|
309
|
-
|
|
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 */
|
|
310
434
|
} rbs_ast_members_attr_reader_t;
|
|
311
435
|
|
|
312
436
|
typedef struct rbs_ast_members_attr_writer {
|
|
@@ -314,11 +438,19 @@ typedef struct rbs_ast_members_attr_writer {
|
|
|
314
438
|
|
|
315
439
|
struct rbs_ast_symbol *name;
|
|
316
440
|
struct rbs_node *type;
|
|
317
|
-
|
|
318
|
-
|
|
441
|
+
rbs_attr_ivar_name_t ivar_name;
|
|
442
|
+
enum rbs_attribute_kind kind;
|
|
319
443
|
struct rbs_node_list *annotations;
|
|
320
|
-
struct rbs_ast_comment *comment;
|
|
321
|
-
|
|
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 */
|
|
322
454
|
} rbs_ast_members_attr_writer_t;
|
|
323
455
|
|
|
324
456
|
typedef struct rbs_ast_members_class_instance_variable {
|
|
@@ -326,7 +458,11 @@ typedef struct rbs_ast_members_class_instance_variable {
|
|
|
326
458
|
|
|
327
459
|
struct rbs_ast_symbol *name;
|
|
328
460
|
struct rbs_node *type;
|
|
329
|
-
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 */
|
|
330
466
|
} rbs_ast_members_class_instance_variable_t;
|
|
331
467
|
|
|
332
468
|
typedef struct rbs_ast_members_class_variable {
|
|
@@ -334,7 +470,11 @@ typedef struct rbs_ast_members_class_variable {
|
|
|
334
470
|
|
|
335
471
|
struct rbs_ast_symbol *name;
|
|
336
472
|
struct rbs_node *type;
|
|
337
|
-
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 */
|
|
338
478
|
} rbs_ast_members_class_variable_t;
|
|
339
479
|
|
|
340
480
|
typedef struct rbs_ast_members_extend {
|
|
@@ -343,7 +483,11 @@ typedef struct rbs_ast_members_extend {
|
|
|
343
483
|
struct rbs_type_name *name;
|
|
344
484
|
struct rbs_node_list *args;
|
|
345
485
|
struct rbs_node_list *annotations;
|
|
346
|
-
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 */
|
|
347
491
|
} rbs_ast_members_extend_t;
|
|
348
492
|
|
|
349
493
|
typedef struct rbs_ast_members_include {
|
|
@@ -352,7 +496,11 @@ typedef struct rbs_ast_members_include {
|
|
|
352
496
|
struct rbs_type_name *name;
|
|
353
497
|
struct rbs_node_list *args;
|
|
354
498
|
struct rbs_node_list *annotations;
|
|
355
|
-
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 */
|
|
356
504
|
} rbs_ast_members_include_t;
|
|
357
505
|
|
|
358
506
|
typedef struct rbs_ast_members_instance_variable {
|
|
@@ -360,19 +508,29 @@ typedef struct rbs_ast_members_instance_variable {
|
|
|
360
508
|
|
|
361
509
|
struct rbs_ast_symbol *name;
|
|
362
510
|
struct rbs_node *type;
|
|
363
|
-
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 */
|
|
364
516
|
} rbs_ast_members_instance_variable_t;
|
|
365
517
|
|
|
366
518
|
typedef struct rbs_ast_members_method_definition {
|
|
367
519
|
rbs_node_t base;
|
|
368
520
|
|
|
369
521
|
struct rbs_ast_symbol *name;
|
|
370
|
-
|
|
522
|
+
enum rbs_method_definition_kind kind;
|
|
371
523
|
struct rbs_node_list *overloads;
|
|
372
524
|
struct rbs_node_list *annotations;
|
|
373
|
-
struct rbs_ast_comment *comment;
|
|
525
|
+
struct rbs_ast_comment *comment; /* Optional */
|
|
374
526
|
bool overloading;
|
|
375
|
-
|
|
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 */
|
|
376
534
|
} rbs_ast_members_method_definition_t;
|
|
377
535
|
|
|
378
536
|
typedef struct rbs_ast_members_method_definition_overload {
|
|
@@ -388,7 +546,11 @@ typedef struct rbs_ast_members_prepend {
|
|
|
388
546
|
struct rbs_type_name *name;
|
|
389
547
|
struct rbs_node_list *args;
|
|
390
548
|
struct rbs_node_list *annotations;
|
|
391
|
-
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 */
|
|
392
554
|
} rbs_ast_members_prepend_t;
|
|
393
555
|
|
|
394
556
|
typedef struct rbs_ast_members_private {
|
|
@@ -401,83 +563,129 @@ typedef struct rbs_ast_members_public {
|
|
|
401
563
|
|
|
402
564
|
} rbs_ast_members_public_t;
|
|
403
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
|
+
|
|
404
579
|
typedef struct rbs_ast_ruby_annotations_class_alias_annotation {
|
|
405
580
|
rbs_node_t base;
|
|
406
581
|
|
|
407
|
-
|
|
408
|
-
|
|
582
|
+
rbs_location_range prefix_location;
|
|
583
|
+
rbs_location_range keyword_location;
|
|
409
584
|
struct rbs_type_name *type_name;
|
|
410
|
-
|
|
585
|
+
rbs_location_range type_name_location; /* Optional */
|
|
411
586
|
} rbs_ast_ruby_annotations_class_alias_annotation_t;
|
|
412
587
|
|
|
413
588
|
typedef struct rbs_ast_ruby_annotations_colon_method_type_annotation {
|
|
414
589
|
rbs_node_t base;
|
|
415
590
|
|
|
416
|
-
|
|
591
|
+
rbs_location_range prefix_location;
|
|
417
592
|
struct rbs_node_list *annotations;
|
|
418
593
|
struct rbs_node *method_type;
|
|
419
594
|
} rbs_ast_ruby_annotations_colon_method_type_annotation_t;
|
|
420
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
|
+
|
|
421
607
|
typedef struct rbs_ast_ruby_annotations_instance_variable_annotation {
|
|
422
608
|
rbs_node_t base;
|
|
423
609
|
|
|
424
|
-
|
|
610
|
+
rbs_location_range prefix_location;
|
|
425
611
|
struct rbs_ast_symbol *ivar_name;
|
|
426
|
-
|
|
427
|
-
|
|
612
|
+
rbs_location_range ivar_name_location;
|
|
613
|
+
rbs_location_range colon_location;
|
|
428
614
|
struct rbs_node *type;
|
|
429
|
-
|
|
615
|
+
rbs_location_range comment_location; /* Optional */
|
|
430
616
|
} rbs_ast_ruby_annotations_instance_variable_annotation_t;
|
|
431
617
|
|
|
432
618
|
typedef struct rbs_ast_ruby_annotations_method_types_annotation {
|
|
433
619
|
rbs_node_t base;
|
|
434
620
|
|
|
435
|
-
|
|
621
|
+
rbs_location_range prefix_location;
|
|
436
622
|
struct rbs_node_list *overloads;
|
|
437
|
-
|
|
623
|
+
rbs_location_range_list_t *vertical_bar_locations;
|
|
624
|
+
rbs_location_range dot3_location; /* Optional */
|
|
438
625
|
} rbs_ast_ruby_annotations_method_types_annotation_t;
|
|
439
626
|
|
|
440
627
|
typedef struct rbs_ast_ruby_annotations_module_alias_annotation {
|
|
441
628
|
rbs_node_t base;
|
|
442
629
|
|
|
443
|
-
|
|
444
|
-
|
|
630
|
+
rbs_location_range prefix_location;
|
|
631
|
+
rbs_location_range keyword_location;
|
|
445
632
|
struct rbs_type_name *type_name;
|
|
446
|
-
|
|
633
|
+
rbs_location_range type_name_location; /* Optional */
|
|
447
634
|
} rbs_ast_ruby_annotations_module_alias_annotation_t;
|
|
448
635
|
|
|
449
636
|
typedef struct rbs_ast_ruby_annotations_node_type_assertion {
|
|
450
637
|
rbs_node_t base;
|
|
451
638
|
|
|
452
|
-
|
|
639
|
+
rbs_location_range prefix_location;
|
|
453
640
|
struct rbs_node *type;
|
|
454
641
|
} rbs_ast_ruby_annotations_node_type_assertion_t;
|
|
455
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
|
+
|
|
456
653
|
typedef struct rbs_ast_ruby_annotations_return_type_annotation {
|
|
457
654
|
rbs_node_t base;
|
|
458
655
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
656
|
+
rbs_location_range prefix_location;
|
|
657
|
+
rbs_location_range return_location;
|
|
658
|
+
rbs_location_range colon_location;
|
|
462
659
|
struct rbs_node *return_type;
|
|
463
|
-
|
|
660
|
+
rbs_location_range comment_location; /* Optional */
|
|
464
661
|
} rbs_ast_ruby_annotations_return_type_annotation_t;
|
|
465
662
|
|
|
466
663
|
typedef struct rbs_ast_ruby_annotations_skip_annotation {
|
|
467
664
|
rbs_node_t base;
|
|
468
665
|
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
666
|
+
rbs_location_range prefix_location;
|
|
667
|
+
rbs_location_range skip_location;
|
|
668
|
+
rbs_location_range comment_location; /* Optional */
|
|
472
669
|
} rbs_ast_ruby_annotations_skip_annotation_t;
|
|
473
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
|
+
|
|
474
682
|
typedef struct rbs_ast_ruby_annotations_type_application_annotation {
|
|
475
683
|
rbs_node_t base;
|
|
476
684
|
|
|
477
|
-
|
|
685
|
+
rbs_location_range prefix_location;
|
|
478
686
|
struct rbs_node_list *type_args;
|
|
479
|
-
|
|
480
|
-
|
|
687
|
+
rbs_location_range close_bracket_location;
|
|
688
|
+
rbs_location_range_list_t *comma_locations;
|
|
481
689
|
} rbs_ast_ruby_annotations_type_application_annotation_t;
|
|
482
690
|
|
|
483
691
|
typedef struct rbs_ast_string {
|
|
@@ -490,11 +698,18 @@ typedef struct rbs_ast_type_param {
|
|
|
490
698
|
rbs_node_t base;
|
|
491
699
|
|
|
492
700
|
struct rbs_ast_symbol *name;
|
|
493
|
-
|
|
494
|
-
struct rbs_node *upper_bound;
|
|
495
|
-
struct rbs_node *lower_bound;
|
|
496
|
-
struct rbs_node *default_type;
|
|
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 */
|
|
497
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 */
|
|
498
713
|
} rbs_ast_type_param_t;
|
|
499
714
|
|
|
500
715
|
typedef struct rbs_method_type {
|
|
@@ -502,7 +717,10 @@ typedef struct rbs_method_type {
|
|
|
502
717
|
|
|
503
718
|
struct rbs_node_list *type_params;
|
|
504
719
|
struct rbs_node *type;
|
|
505
|
-
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 */
|
|
506
724
|
} rbs_method_type_t;
|
|
507
725
|
|
|
508
726
|
typedef struct rbs_namespace {
|
|
@@ -531,6 +749,9 @@ typedef struct rbs_types_alias {
|
|
|
531
749
|
|
|
532
750
|
struct rbs_type_name *name;
|
|
533
751
|
struct rbs_node_list *args;
|
|
752
|
+
|
|
753
|
+
rbs_location_range name_range; /* Required */
|
|
754
|
+
rbs_location_range args_range; /* Optional */
|
|
534
755
|
} rbs_types_alias_t;
|
|
535
756
|
|
|
536
757
|
typedef struct rbs_types_bases_any {
|
|
@@ -584,7 +805,7 @@ typedef struct rbs_types_block {
|
|
|
584
805
|
|
|
585
806
|
struct rbs_node *type;
|
|
586
807
|
bool required;
|
|
587
|
-
struct rbs_node *self_type;
|
|
808
|
+
struct rbs_node *self_type; /* Optional */
|
|
588
809
|
} rbs_types_block_t;
|
|
589
810
|
|
|
590
811
|
typedef struct rbs_types_class_instance {
|
|
@@ -592,12 +813,19 @@ typedef struct rbs_types_class_instance {
|
|
|
592
813
|
|
|
593
814
|
struct rbs_type_name *name;
|
|
594
815
|
struct rbs_node_list *args;
|
|
816
|
+
|
|
817
|
+
rbs_location_range name_range; /* Required */
|
|
818
|
+
rbs_location_range args_range; /* Optional */
|
|
595
819
|
} rbs_types_class_instance_t;
|
|
596
820
|
|
|
597
821
|
typedef struct rbs_types_class_singleton {
|
|
598
822
|
rbs_node_t base;
|
|
599
823
|
|
|
600
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 */
|
|
601
829
|
} rbs_types_class_singleton_t;
|
|
602
830
|
|
|
603
831
|
typedef struct rbs_types_function {
|
|
@@ -605,11 +833,11 @@ typedef struct rbs_types_function {
|
|
|
605
833
|
|
|
606
834
|
struct rbs_node_list *required_positionals;
|
|
607
835
|
struct rbs_node_list *optional_positionals;
|
|
608
|
-
struct rbs_node *rest_positionals;
|
|
836
|
+
struct rbs_node *rest_positionals; /* Optional */
|
|
609
837
|
struct rbs_node_list *trailing_positionals;
|
|
610
838
|
struct rbs_hash *required_keywords;
|
|
611
839
|
struct rbs_hash *optional_keywords;
|
|
612
|
-
struct rbs_node *rest_keywords;
|
|
840
|
+
struct rbs_node *rest_keywords; /* Optional */
|
|
613
841
|
struct rbs_node *return_type;
|
|
614
842
|
} rbs_types_function_t;
|
|
615
843
|
|
|
@@ -617,7 +845,9 @@ typedef struct rbs_types_function_param {
|
|
|
617
845
|
rbs_node_t base;
|
|
618
846
|
|
|
619
847
|
struct rbs_node *type;
|
|
620
|
-
struct rbs_ast_symbol *name;
|
|
848
|
+
struct rbs_ast_symbol *name; /* Optional */
|
|
849
|
+
|
|
850
|
+
rbs_location_range name_range; /* Optional */
|
|
621
851
|
} rbs_types_function_param_t;
|
|
622
852
|
|
|
623
853
|
typedef struct rbs_types_interface {
|
|
@@ -625,6 +855,9 @@ typedef struct rbs_types_interface {
|
|
|
625
855
|
|
|
626
856
|
struct rbs_type_name *name;
|
|
627
857
|
struct rbs_node_list *args;
|
|
858
|
+
|
|
859
|
+
rbs_location_range name_range; /* Required */
|
|
860
|
+
rbs_location_range args_range; /* Optional */
|
|
628
861
|
} rbs_types_interface_t;
|
|
629
862
|
|
|
630
863
|
typedef struct rbs_types_intersection {
|
|
@@ -649,8 +882,8 @@ typedef struct rbs_types_proc {
|
|
|
649
882
|
rbs_node_t base;
|
|
650
883
|
|
|
651
884
|
struct rbs_node *type;
|
|
652
|
-
struct rbs_types_block *block;
|
|
653
|
-
struct rbs_node *self_type;
|
|
885
|
+
struct rbs_types_block *block; /* Optional */
|
|
886
|
+
struct rbs_node *self_type; /* Optional */
|
|
654
887
|
} rbs_types_proc_t;
|
|
655
888
|
|
|
656
889
|
typedef struct rbs_types_record {
|
|
@@ -697,18 +930,9 @@ typedef union rbs_ast_ruby_annotations {
|
|
|
697
930
|
rbs_ast_ruby_annotations_node_type_assertion_t node_type_assertion;
|
|
698
931
|
rbs_ast_ruby_annotations_return_type_annotation_t return_type_annotation;
|
|
699
932
|
rbs_ast_ruby_annotations_skip_annotation_t skip_annotation;
|
|
933
|
+
rbs_ast_ruby_annotations_param_type_annotation_t param_type_annotation;
|
|
700
934
|
} rbs_ast_ruby_annotations_t;
|
|
701
935
|
|
|
702
|
-
/// `rbs_keyword_t` models RBS keywords like "private", "instance", "covariant", etc.
|
|
703
|
-
/// These are stored in the global constant pool, and get surfaced to Ruby as `Symbol`s,
|
|
704
|
-
/// just like `rbs_ast_symbol_t`s.
|
|
705
|
-
typedef struct rbs_keyword {
|
|
706
|
-
rbs_node_t base;
|
|
707
|
-
rbs_constant_id_t constant_id;
|
|
708
|
-
} rbs_keyword_t;
|
|
709
|
-
|
|
710
|
-
rbs_keyword_t *rbs_keyword_new(rbs_allocator_t *, rbs_location_t *, rbs_constant_id_t);
|
|
711
|
-
|
|
712
936
|
/// `rbs_ast_symbol_t` models user-defined identifiers like class names, method names, etc.
|
|
713
937
|
/// These get stored in the parser's own constant pool, and get surfaced to Ruby as `Symbol`s.
|
|
714
938
|
typedef struct rbs_ast_symbol {
|
|
@@ -716,79 +940,83 @@ typedef struct rbs_ast_symbol {
|
|
|
716
940
|
rbs_constant_id_t constant_id;
|
|
717
941
|
} rbs_ast_symbol_t;
|
|
718
942
|
|
|
719
|
-
rbs_ast_symbol_t *rbs_ast_symbol_new(rbs_allocator_t *,
|
|
720
|
-
|
|
721
|
-
rbs_ast_annotation_t *rbs_ast_annotation_new(rbs_allocator_t *allocator,
|
|
722
|
-
rbs_ast_bool_t *rbs_ast_bool_new(rbs_allocator_t *allocator,
|
|
723
|
-
rbs_ast_comment_t *rbs_ast_comment_new(rbs_allocator_t *allocator,
|
|
724
|
-
rbs_ast_declarations_class_t *rbs_ast_declarations_class_new(rbs_allocator_t *allocator,
|
|
725
|
-
rbs_ast_declarations_class_super_t *rbs_ast_declarations_class_super_new(rbs_allocator_t *allocator,
|
|
726
|
-
rbs_ast_declarations_class_alias_t *rbs_ast_declarations_class_alias_new(rbs_allocator_t *allocator,
|
|
727
|
-
rbs_ast_declarations_constant_t *rbs_ast_declarations_constant_new(rbs_allocator_t *allocator,
|
|
728
|
-
rbs_ast_declarations_global_t *rbs_ast_declarations_global_new(rbs_allocator_t *allocator,
|
|
729
|
-
rbs_ast_declarations_interface_t *rbs_ast_declarations_interface_new(rbs_allocator_t *allocator,
|
|
730
|
-
rbs_ast_declarations_module_t *rbs_ast_declarations_module_new(rbs_allocator_t *allocator,
|
|
731
|
-
rbs_ast_declarations_module_self_t *rbs_ast_declarations_module_self_new(rbs_allocator_t *allocator,
|
|
732
|
-
rbs_ast_declarations_module_alias_t *rbs_ast_declarations_module_alias_new(rbs_allocator_t *allocator,
|
|
733
|
-
rbs_ast_declarations_type_alias_t *rbs_ast_declarations_type_alias_new(rbs_allocator_t *allocator,
|
|
734
|
-
rbs_ast_directives_use_t *rbs_ast_directives_use_new(rbs_allocator_t *allocator,
|
|
735
|
-
rbs_ast_directives_use_single_clause_t *rbs_ast_directives_use_single_clause_new(rbs_allocator_t *allocator,
|
|
736
|
-
rbs_ast_directives_use_wildcard_clause_t *rbs_ast_directives_use_wildcard_clause_new(rbs_allocator_t *allocator,
|
|
737
|
-
rbs_ast_integer_t *rbs_ast_integer_new(rbs_allocator_t *allocator,
|
|
738
|
-
rbs_ast_members_alias_t *rbs_ast_members_alias_new(rbs_allocator_t *allocator,
|
|
739
|
-
rbs_ast_members_attr_accessor_t *rbs_ast_members_attr_accessor_new(rbs_allocator_t *allocator,
|
|
740
|
-
rbs_ast_members_attr_reader_t *rbs_ast_members_attr_reader_new(rbs_allocator_t *allocator,
|
|
741
|
-
rbs_ast_members_attr_writer_t *rbs_ast_members_attr_writer_new(rbs_allocator_t *allocator,
|
|
742
|
-
rbs_ast_members_class_instance_variable_t *rbs_ast_members_class_instance_variable_new(rbs_allocator_t *allocator,
|
|
743
|
-
rbs_ast_members_class_variable_t *rbs_ast_members_class_variable_new(rbs_allocator_t *allocator,
|
|
744
|
-
rbs_ast_members_extend_t *rbs_ast_members_extend_new(rbs_allocator_t *allocator,
|
|
745
|
-
rbs_ast_members_include_t *rbs_ast_members_include_new(rbs_allocator_t *allocator,
|
|
746
|
-
rbs_ast_members_instance_variable_t *rbs_ast_members_instance_variable_new(rbs_allocator_t *allocator,
|
|
747
|
-
rbs_ast_members_method_definition_t *rbs_ast_members_method_definition_new(rbs_allocator_t *allocator,
|
|
748
|
-
rbs_ast_members_method_definition_overload_t *rbs_ast_members_method_definition_overload_new(rbs_allocator_t *allocator,
|
|
749
|
-
rbs_ast_members_prepend_t *rbs_ast_members_prepend_new(rbs_allocator_t *allocator,
|
|
750
|
-
rbs_ast_members_private_t *rbs_ast_members_private_new(rbs_allocator_t *allocator,
|
|
751
|
-
rbs_ast_members_public_t *rbs_ast_members_public_new(rbs_allocator_t *allocator,
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
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);
|
|
793
1021
|
|
|
794
1022
|
#endif
|