rbs 4.0.0.dev.4 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +14 -14
- data/.github/workflows/bundle-update.yml +60 -0
- data/.github/workflows/c-check.yml +18 -11
- data/.github/workflows/comments.yml +5 -3
- data/.github/workflows/dependabot.yml +2 -2
- data/.github/workflows/ruby.yml +27 -34
- data/.github/workflows/rust.yml +95 -0
- data/.github/workflows/typecheck.yml +2 -2
- data/.github/workflows/windows.yml +2 -2
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +323 -0
- data/README.md +1 -1
- data/Rakefile +43 -33
- data/Steepfile +1 -0
- data/config.yml +426 -24
- data/core/array.rbs +307 -227
- data/core/basic_object.rbs +9 -8
- data/core/binding.rbs +0 -2
- data/core/builtin.rbs +2 -2
- data/core/class.rbs +6 -5
- data/core/comparable.rbs +55 -34
- data/core/complex.rbs +104 -78
- data/core/dir.rbs +61 -49
- data/core/encoding.rbs +12 -15
- data/core/enumerable.rbs +179 -87
- data/core/enumerator/arithmetic_sequence.rbs +70 -0
- data/core/enumerator.rbs +65 -2
- data/core/errno.rbs +11 -2
- data/core/errors.rbs +58 -29
- data/core/exception.rbs +13 -13
- data/core/fiber.rbs +74 -54
- data/core/file.rbs +280 -177
- data/core/file_test.rbs +3 -3
- data/core/float.rbs +257 -92
- data/core/gc.rbs +425 -281
- data/core/hash.rbs +1045 -739
- data/core/integer.rbs +135 -137
- data/core/io/buffer.rbs +53 -42
- data/core/io/wait.rbs +13 -35
- data/core/io.rbs +192 -144
- data/core/kernel.rbs +216 -155
- data/core/marshal.rbs +4 -4
- data/core/match_data.rbs +15 -13
- data/core/math.rbs +107 -66
- data/core/method.rbs +69 -33
- data/core/module.rbs +244 -106
- data/core/nil_class.rbs +7 -6
- data/core/numeric.rbs +74 -63
- data/core/object.rbs +9 -11
- data/core/object_space.rbs +30 -23
- data/core/pathname.rbs +1322 -0
- data/core/proc.rbs +95 -58
- data/core/process.rbs +222 -202
- data/core/ractor.rbs +371 -515
- data/core/random.rbs +21 -3
- data/core/range.rbs +159 -57
- data/core/rational.rbs +60 -89
- data/core/rbs/unnamed/argf.rbs +60 -53
- data/core/rbs/unnamed/env_class.rbs +19 -14
- data/core/rbs/unnamed/main_class.rbs +123 -0
- data/core/rbs/unnamed/random.rbs +11 -118
- data/core/regexp.rbs +258 -214
- data/core/ruby.rbs +53 -0
- data/core/ruby_vm.rbs +38 -34
- data/core/rubygems/config_file.rbs +5 -5
- data/core/rubygems/errors.rbs +4 -71
- data/core/rubygems/requirement.rbs +5 -5
- data/core/rubygems/rubygems.rbs +16 -82
- data/core/rubygems/version.rbs +2 -3
- data/core/set.rbs +490 -360
- data/core/signal.rbs +26 -16
- data/core/string.rbs +3234 -1285
- data/core/struct.rbs +27 -26
- data/core/symbol.rbs +41 -34
- data/core/thread.rbs +135 -67
- data/core/time.rbs +81 -50
- data/core/trace_point.rbs +41 -35
- data/core/true_class.rbs +2 -2
- data/core/unbound_method.rbs +24 -16
- data/core/warning.rbs +7 -7
- data/docs/aliases.md +79 -0
- data/docs/collection.md +3 -3
- data/docs/config.md +171 -0
- data/docs/encoding.md +56 -0
- data/docs/gem.md +0 -1
- data/docs/inline.md +576 -0
- data/docs/sigs.md +3 -3
- data/docs/syntax.md +46 -16
- data/docs/type_fingerprint.md +21 -0
- data/exe/rbs +1 -1
- data/ext/rbs_extension/ast_translation.c +544 -116
- data/ext/rbs_extension/ast_translation.h +3 -0
- data/ext/rbs_extension/class_constants.c +16 -2
- data/ext/rbs_extension/class_constants.h +8 -0
- data/ext/rbs_extension/extconf.rb +5 -1
- data/ext/rbs_extension/legacy_location.c +33 -56
- data/ext/rbs_extension/legacy_location.h +37 -0
- data/ext/rbs_extension/main.c +44 -35
- data/include/rbs/ast.h +448 -173
- data/include/rbs/defines.h +27 -0
- data/include/rbs/lexer.h +30 -11
- data/include/rbs/location.h +25 -44
- data/include/rbs/parser.h +6 -6
- data/include/rbs/string.h +0 -2
- data/include/rbs/util/rbs_allocator.h +34 -13
- data/include/rbs/util/rbs_assert.h +12 -1
- data/include/rbs/util/rbs_constant_pool.h +0 -3
- data/include/rbs/util/rbs_encoding.h +2 -0
- data/include/rbs/util/rbs_unescape.h +2 -1
- data/include/rbs.h +8 -0
- data/lib/rbs/ast/annotation.rb +1 -1
- data/lib/rbs/ast/comment.rb +1 -1
- data/lib/rbs/ast/declarations.rb +10 -10
- data/lib/rbs/ast/members.rb +14 -14
- data/lib/rbs/ast/ruby/annotations.rb +293 -3
- data/lib/rbs/ast/ruby/comment_block.rb +24 -0
- data/lib/rbs/ast/ruby/declarations.rb +198 -3
- data/lib/rbs/ast/ruby/helpers/constant_helper.rb +4 -0
- data/lib/rbs/ast/ruby/members.rb +532 -22
- data/lib/rbs/ast/type_param.rb +24 -4
- data/lib/rbs/buffer.rb +20 -15
- data/lib/rbs/cli/diff.rb +16 -15
- data/lib/rbs/cli/validate.rb +38 -106
- data/lib/rbs/cli.rb +52 -19
- data/lib/rbs/collection/config/lockfile_generator.rb +14 -2
- data/lib/rbs/collection/sources/git.rb +1 -0
- data/lib/rbs/definition.rb +1 -1
- data/lib/rbs/definition_builder/ancestor_builder.rb +62 -9
- data/lib/rbs/definition_builder/method_builder.rb +20 -0
- data/lib/rbs/definition_builder.rb +147 -25
- data/lib/rbs/diff.rb +7 -1
- data/lib/rbs/environment.rb +227 -74
- data/lib/rbs/environment_loader.rb +0 -6
- data/lib/rbs/errors.rb +27 -18
- data/lib/rbs/inline_parser.rb +342 -6
- data/lib/rbs/location_aux.rb +1 -1
- data/lib/rbs/locator.rb +5 -1
- data/lib/rbs/method_type.rb +5 -3
- data/lib/rbs/parser_aux.rb +20 -7
- data/lib/rbs/prototype/helpers.rb +57 -0
- data/lib/rbs/prototype/rb.rb +3 -28
- data/lib/rbs/prototype/rbi.rb +3 -20
- data/lib/rbs/prototype/runtime.rb +8 -0
- data/lib/rbs/resolver/constant_resolver.rb +2 -2
- data/lib/rbs/resolver/type_name_resolver.rb +116 -38
- data/lib/rbs/subtractor.rb +3 -1
- data/lib/rbs/test/type_check.rb +19 -2
- data/lib/rbs/type_name.rb +1 -1
- data/lib/rbs/types.rb +88 -78
- data/lib/rbs/unit_test/type_assertions.rb +35 -8
- data/lib/rbs/validator.rb +2 -2
- data/lib/rbs/version.rb +1 -1
- data/lib/rbs.rb +1 -2
- data/lib/rdoc/discover.rb +1 -1
- data/lib/rdoc_plugin/parser.rb +1 -1
- data/rbs.gemspec +4 -3
- data/rust/.gitignore +1 -0
- data/rust/Cargo.lock +378 -0
- data/rust/Cargo.toml +7 -0
- data/rust/ruby-rbs/Cargo.toml +22 -0
- data/rust/ruby-rbs/build.rs +764 -0
- data/rust/ruby-rbs/examples/locations.rs +60 -0
- data/rust/ruby-rbs/src/lib.rs +1 -0
- data/rust/ruby-rbs/src/node/mod.rs +742 -0
- data/rust/ruby-rbs/tests/sanity.rs +47 -0
- data/rust/ruby-rbs/vendor/rbs/config.yml +1 -0
- data/rust/ruby-rbs-sys/Cargo.toml +23 -0
- data/rust/ruby-rbs-sys/build.rs +204 -0
- data/rust/ruby-rbs-sys/src/lib.rs +50 -0
- data/rust/ruby-rbs-sys/vendor/rbs/include +1 -0
- data/rust/ruby-rbs-sys/vendor/rbs/src +1 -0
- data/rust/ruby-rbs-sys/wrapper.h +1 -0
- data/schema/typeParam.json +17 -1
- data/sig/ast/ruby/annotations.rbs +315 -4
- data/sig/ast/ruby/comment_block.rbs +8 -0
- data/sig/ast/ruby/declarations.rbs +102 -4
- data/sig/ast/ruby/members.rbs +108 -2
- data/sig/cli/diff.rbs +5 -11
- data/sig/cli/validate.rbs +12 -8
- data/sig/cli.rbs +18 -18
- data/sig/definition.rbs +6 -1
- data/sig/definition_builder.rbs +2 -0
- data/sig/environment.rbs +70 -12
- data/sig/errors.rbs +13 -14
- data/sig/inline_parser.rbs +39 -2
- data/sig/locator.rbs +0 -2
- data/sig/manifest.yaml +0 -1
- data/sig/method_builder.rbs +3 -1
- data/sig/parser.rbs +31 -13
- data/sig/prototype/helpers.rbs +2 -0
- data/sig/resolver/type_name_resolver.rbs +35 -7
- data/sig/source.rbs +3 -3
- data/sig/type_param.rbs +13 -8
- data/sig/types.rbs +6 -7
- data/sig/unit_test/spy.rbs +0 -8
- data/sig/unit_test/type_assertions.rbs +11 -0
- data/src/ast.c +410 -153
- data/src/lexer.c +1392 -1313
- data/src/lexer.re +3 -0
- data/src/lexstate.c +58 -37
- data/src/location.c +8 -48
- data/src/parser.c +977 -516
- data/src/string.c +0 -48
- data/src/util/rbs_allocator.c +89 -71
- data/src/util/rbs_assert.c +1 -1
- data/src/util/rbs_buffer.c +2 -2
- data/src/util/rbs_constant_pool.c +10 -14
- data/src/util/rbs_encoding.c +4 -8
- data/src/util/rbs_unescape.c +56 -20
- data/stdlib/bigdecimal/0/big_decimal.rbs +116 -98
- data/stdlib/bigdecimal-math/0/big_math.rbs +169 -8
- data/stdlib/cgi/0/core.rbs +9 -393
- data/stdlib/cgi/0/manifest.yaml +1 -0
- data/stdlib/cgi-escape/0/escape.rbs +171 -0
- data/stdlib/coverage/0/coverage.rbs +7 -4
- data/stdlib/date/0/date.rbs +92 -79
- data/stdlib/date/0/date_time.rbs +25 -24
- data/stdlib/delegate/0/delegator.rbs +10 -7
- data/stdlib/did_you_mean/0/did_you_mean.rbs +17 -16
- data/stdlib/digest/0/digest.rbs +110 -0
- data/stdlib/erb/0/erb.rbs +748 -347
- data/stdlib/etc/0/etc.rbs +55 -50
- data/stdlib/fileutils/0/fileutils.rbs +158 -139
- data/stdlib/forwardable/0/forwardable.rbs +13 -10
- data/stdlib/io-console/0/io-console.rbs +2 -2
- data/stdlib/json/0/json.rbs +217 -136
- data/stdlib/monitor/0/monitor.rbs +3 -3
- data/stdlib/net-http/0/net-http.rbs +162 -134
- data/stdlib/objspace/0/objspace.rbs +17 -34
- data/stdlib/open-uri/0/open-uri.rbs +48 -8
- data/stdlib/open3/0/open3.rbs +469 -10
- data/stdlib/openssl/0/openssl.rbs +475 -357
- data/stdlib/optparse/0/optparse.rbs +26 -17
- data/stdlib/pathname/0/pathname.rbs +11 -1381
- data/stdlib/pp/0/pp.rbs +9 -8
- data/stdlib/prettyprint/0/prettyprint.rbs +7 -7
- data/stdlib/pstore/0/pstore.rbs +35 -30
- data/stdlib/psych/0/psych.rbs +65 -12
- data/stdlib/psych/0/store.rbs +2 -4
- data/stdlib/pty/0/pty.rbs +9 -6
- data/stdlib/random-formatter/0/random-formatter.rbs +277 -0
- data/stdlib/rdoc/0/code_object.rbs +2 -1
- data/stdlib/rdoc/0/parser.rbs +1 -1
- data/stdlib/rdoc/0/rdoc.rbs +1 -1
- data/stdlib/rdoc/0/store.rbs +1 -1
- data/stdlib/resolv/0/resolv.rbs +25 -68
- data/stdlib/ripper/0/ripper.rbs +22 -19
- data/stdlib/securerandom/0/manifest.yaml +2 -0
- data/stdlib/securerandom/0/securerandom.rbs +7 -20
- data/stdlib/shellwords/0/shellwords.rbs +2 -2
- data/stdlib/singleton/0/singleton.rbs +3 -0
- data/stdlib/socket/0/addrinfo.rbs +7 -7
- data/stdlib/socket/0/basic_socket.rbs +3 -3
- data/stdlib/socket/0/ip_socket.rbs +10 -8
- data/stdlib/socket/0/socket.rbs +23 -10
- data/stdlib/socket/0/tcp_server.rbs +1 -1
- data/stdlib/socket/0/tcp_socket.rbs +11 -3
- data/stdlib/socket/0/udp_socket.rbs +1 -1
- data/stdlib/socket/0/unix_server.rbs +1 -1
- data/stdlib/stringio/0/stringio.rbs +1177 -85
- data/stdlib/strscan/0/string_scanner.rbs +27 -25
- data/stdlib/tempfile/0/tempfile.rbs +25 -21
- data/stdlib/time/0/time.rbs +8 -6
- data/stdlib/timeout/0/timeout.rbs +63 -7
- data/stdlib/tsort/0/cyclic.rbs +3 -0
- data/stdlib/tsort/0/tsort.rbs +7 -6
- data/stdlib/uri/0/common.rbs +42 -20
- data/stdlib/uri/0/file.rbs +3 -3
- data/stdlib/uri/0/generic.rbs +26 -18
- data/stdlib/uri/0/http.rbs +2 -2
- data/stdlib/uri/0/ldap.rbs +2 -2
- data/stdlib/uri/0/mailto.rbs +3 -3
- data/stdlib/uri/0/rfc2396_parser.rbs +12 -12
- data/stdlib/zlib/0/deflate.rbs +4 -3
- data/stdlib/zlib/0/gzip_reader.rbs +6 -6
- data/stdlib/zlib/0/gzip_writer.rbs +14 -12
- data/stdlib/zlib/0/inflate.rbs +1 -1
- data/stdlib/zlib/0/need_dict.rbs +1 -1
- data/stdlib/zlib/0/zstream.rbs +1 -0
- metadata +50 -6
data/config.yml
CHANGED
|
@@ -1,19 +1,25 @@
|
|
|
1
|
+
# See `docs/config.md` for quick documentation of this file format.
|
|
2
|
+
|
|
1
3
|
nodes:
|
|
2
4
|
- name: RBS::AST::Annotation
|
|
5
|
+
rust_name: AnnotationNode
|
|
3
6
|
fields:
|
|
4
7
|
- name: string
|
|
5
8
|
c_type: rbs_string
|
|
6
9
|
- name: RBS::AST::Bool
|
|
10
|
+
rust_name: BoolNode
|
|
7
11
|
expose_to_ruby: false
|
|
8
12
|
expose_location: false
|
|
9
13
|
fields:
|
|
10
14
|
- name: value
|
|
11
15
|
c_type: bool
|
|
12
16
|
- name: RBS::AST::Comment
|
|
17
|
+
rust_name: CommentNode
|
|
13
18
|
fields:
|
|
14
19
|
- name: string
|
|
15
20
|
c_type: rbs_string
|
|
16
21
|
- name: RBS::AST::Declarations::Class
|
|
22
|
+
rust_name: ClassNode
|
|
17
23
|
fields:
|
|
18
24
|
- name: name
|
|
19
25
|
c_type: rbs_type_name
|
|
@@ -21,19 +27,32 @@ nodes:
|
|
|
21
27
|
c_type: rbs_node_list
|
|
22
28
|
- name: super_class
|
|
23
29
|
c_type: rbs_ast_declarations_class_super
|
|
30
|
+
optional: true # NULL when no superclass (e.g., `class Foo end` vs `class Foo < Bar end`)
|
|
24
31
|
- name: members
|
|
25
32
|
c_type: rbs_node_list
|
|
26
33
|
- name: annotations
|
|
27
34
|
c_type: rbs_node_list
|
|
28
35
|
- name: comment
|
|
29
36
|
c_type: rbs_ast_comment
|
|
37
|
+
optional: true # NULL when no comment precedes the declaration
|
|
38
|
+
locations:
|
|
39
|
+
- required: keyword
|
|
40
|
+
- required: name
|
|
41
|
+
- required: end
|
|
42
|
+
- optional: type_params
|
|
43
|
+
- optional: lt
|
|
30
44
|
- name: RBS::AST::Declarations::Class::Super
|
|
45
|
+
rust_name: ClassSuperNode
|
|
31
46
|
fields:
|
|
32
47
|
- name: name
|
|
33
48
|
c_type: rbs_type_name
|
|
34
49
|
- name: args
|
|
35
50
|
c_type: rbs_node_list
|
|
51
|
+
locations:
|
|
52
|
+
- required: name
|
|
53
|
+
- optional: args
|
|
36
54
|
- name: RBS::AST::Declarations::ClassAlias
|
|
55
|
+
rust_name: ClassAliasNode
|
|
37
56
|
fields:
|
|
38
57
|
- name: new_name
|
|
39
58
|
c_type: rbs_type_name
|
|
@@ -41,9 +60,16 @@ nodes:
|
|
|
41
60
|
c_type: rbs_type_name
|
|
42
61
|
- name: comment
|
|
43
62
|
c_type: rbs_ast_comment
|
|
63
|
+
optional: true # NULL when no comment precedes the declaration
|
|
44
64
|
- name: annotations
|
|
45
65
|
c_type: rbs_node_list
|
|
66
|
+
locations:
|
|
67
|
+
- required: keyword
|
|
68
|
+
- required: new_name
|
|
69
|
+
- required: eq
|
|
70
|
+
- required: old_name
|
|
46
71
|
- name: RBS::AST::Declarations::Constant
|
|
72
|
+
rust_name: ConstantNode
|
|
47
73
|
fields:
|
|
48
74
|
- name: name
|
|
49
75
|
c_type: rbs_type_name
|
|
@@ -51,9 +77,14 @@ nodes:
|
|
|
51
77
|
c_type: rbs_node
|
|
52
78
|
- name: comment
|
|
53
79
|
c_type: rbs_ast_comment
|
|
80
|
+
optional: true # NULL when no comment precedes the declaration
|
|
54
81
|
- name: annotations
|
|
55
82
|
c_type: rbs_node_list
|
|
83
|
+
locations:
|
|
84
|
+
- required: name
|
|
85
|
+
- required: colon
|
|
56
86
|
- name: RBS::AST::Declarations::Global
|
|
87
|
+
rust_name: GlobalNode
|
|
57
88
|
fields:
|
|
58
89
|
- name: name
|
|
59
90
|
c_type: rbs_ast_symbol
|
|
@@ -61,9 +92,14 @@ nodes:
|
|
|
61
92
|
c_type: rbs_node
|
|
62
93
|
- name: comment
|
|
63
94
|
c_type: rbs_ast_comment
|
|
95
|
+
optional: true # NULL when no comment precedes the declaration
|
|
64
96
|
- name: annotations
|
|
65
97
|
c_type: rbs_node_list
|
|
98
|
+
locations:
|
|
99
|
+
- required: name
|
|
100
|
+
- required: colon
|
|
66
101
|
- name: RBS::AST::Declarations::Interface
|
|
102
|
+
rust_name: InterfaceNode
|
|
67
103
|
fields:
|
|
68
104
|
- name: name
|
|
69
105
|
c_type: rbs_type_name
|
|
@@ -75,7 +111,14 @@ nodes:
|
|
|
75
111
|
c_type: rbs_node_list
|
|
76
112
|
- name: comment
|
|
77
113
|
c_type: rbs_ast_comment
|
|
114
|
+
optional: true # NULL when no comment precedes the declaration
|
|
115
|
+
locations:
|
|
116
|
+
- required: keyword
|
|
117
|
+
- required: name
|
|
118
|
+
- required: end
|
|
119
|
+
- optional: type_params
|
|
78
120
|
- name: RBS::AST::Declarations::Module
|
|
121
|
+
rust_name: ModuleNode
|
|
79
122
|
fields:
|
|
80
123
|
- name: name
|
|
81
124
|
c_type: rbs_type_name
|
|
@@ -89,13 +132,26 @@ nodes:
|
|
|
89
132
|
c_type: rbs_node_list
|
|
90
133
|
- name: comment
|
|
91
134
|
c_type: rbs_ast_comment
|
|
135
|
+
optional: true # NULL when no comment precedes the declaration
|
|
136
|
+
locations:
|
|
137
|
+
- required: keyword
|
|
138
|
+
- required: name
|
|
139
|
+
- required: end
|
|
140
|
+
- optional: type_params
|
|
141
|
+
- optional: colon
|
|
142
|
+
- optional: self_types
|
|
92
143
|
- name: RBS::AST::Declarations::Module::Self
|
|
144
|
+
rust_name: ModuleSelfNode
|
|
93
145
|
fields:
|
|
94
146
|
- name: name
|
|
95
147
|
c_type: rbs_type_name
|
|
96
148
|
- name: args
|
|
97
149
|
c_type: rbs_node_list
|
|
150
|
+
locations:
|
|
151
|
+
- required: name
|
|
152
|
+
- optional: args
|
|
98
153
|
- name: RBS::AST::Declarations::ModuleAlias
|
|
154
|
+
rust_name: ModuleAliasNode
|
|
99
155
|
fields:
|
|
100
156
|
- name: new_name
|
|
101
157
|
c_type: rbs_type_name
|
|
@@ -103,9 +159,16 @@ nodes:
|
|
|
103
159
|
c_type: rbs_type_name
|
|
104
160
|
- name: comment
|
|
105
161
|
c_type: rbs_ast_comment
|
|
162
|
+
optional: true # NULL when no comment precedes the declaration
|
|
106
163
|
- name: annotations
|
|
107
164
|
c_type: rbs_node_list
|
|
165
|
+
locations:
|
|
166
|
+
- required: keyword
|
|
167
|
+
- required: new_name
|
|
168
|
+
- required: eq
|
|
169
|
+
- required: old_name
|
|
108
170
|
- name: RBS::AST::Declarations::TypeAlias
|
|
171
|
+
rust_name: TypeAliasNode
|
|
109
172
|
fields:
|
|
110
173
|
- name: name
|
|
111
174
|
c_type: rbs_type_name
|
|
@@ -117,82 +180,140 @@ nodes:
|
|
|
117
180
|
c_type: rbs_node_list
|
|
118
181
|
- name: comment
|
|
119
182
|
c_type: rbs_ast_comment
|
|
183
|
+
optional: true # NULL when no comment precedes the declaration
|
|
184
|
+
locations:
|
|
185
|
+
- required: keyword
|
|
186
|
+
- required: name
|
|
187
|
+
- required: eq
|
|
188
|
+
- optional: type_params
|
|
120
189
|
- name: RBS::AST::Directives::Use
|
|
190
|
+
rust_name: UseNode
|
|
121
191
|
fields:
|
|
122
192
|
- name: clauses
|
|
123
193
|
c_type: rbs_node_list
|
|
194
|
+
locations:
|
|
195
|
+
- required: keyword
|
|
124
196
|
- name: RBS::AST::Directives::Use::SingleClause
|
|
197
|
+
rust_name: UseSingleClauseNode
|
|
125
198
|
fields:
|
|
126
199
|
- name: type_name
|
|
127
200
|
c_type: rbs_type_name
|
|
128
201
|
- name: new_name
|
|
129
202
|
c_type: rbs_ast_symbol
|
|
203
|
+
optional: true # NULL when no alias (e.g., `use Foo::Bar` vs `use Foo::Bar as Baz`)
|
|
204
|
+
locations:
|
|
205
|
+
- required: type_name
|
|
206
|
+
- optional: keyword
|
|
207
|
+
- optional: new_name
|
|
130
208
|
- name: RBS::AST::Directives::Use::WildcardClause
|
|
209
|
+
rust_name: UseWildcardClauseNode
|
|
131
210
|
fields:
|
|
132
211
|
- name: namespace
|
|
133
212
|
c_type: rbs_namespace
|
|
134
213
|
c_name: rbs_namespace
|
|
214
|
+
locations:
|
|
215
|
+
- required: namespace
|
|
216
|
+
- required: star
|
|
135
217
|
- name: RBS::AST::Members::Alias
|
|
218
|
+
rust_name: AliasNode
|
|
136
219
|
fields:
|
|
137
220
|
- name: new_name
|
|
138
221
|
c_type: rbs_ast_symbol
|
|
139
222
|
- name: old_name
|
|
140
223
|
c_type: rbs_ast_symbol
|
|
141
224
|
- name: kind
|
|
142
|
-
c_type:
|
|
225
|
+
c_type: alias_kind
|
|
143
226
|
- name: annotations
|
|
144
227
|
c_type: rbs_node_list
|
|
145
228
|
- name: comment
|
|
146
229
|
c_type: rbs_ast_comment
|
|
230
|
+
optional: true # NULL when no comment precedes the declaration
|
|
231
|
+
locations:
|
|
232
|
+
- required: keyword
|
|
233
|
+
- required: new_name
|
|
234
|
+
- required: old_name
|
|
235
|
+
- optional: new_kind
|
|
236
|
+
- optional: old_kind
|
|
147
237
|
- name: RBS::AST::Members::AttrAccessor
|
|
238
|
+
rust_name: AttrAccessorNode
|
|
148
239
|
fields:
|
|
149
240
|
- name: name
|
|
150
241
|
c_type: rbs_ast_symbol
|
|
151
242
|
- name: type
|
|
152
243
|
c_type: rbs_node
|
|
153
244
|
- name: ivar_name
|
|
154
|
-
c_type:
|
|
245
|
+
c_type: rbs_attr_ivar_name
|
|
155
246
|
- name: kind
|
|
156
|
-
c_type:
|
|
247
|
+
c_type: attribute_kind
|
|
157
248
|
- name: annotations
|
|
158
249
|
c_type: rbs_node_list
|
|
159
250
|
- name: comment
|
|
160
251
|
c_type: rbs_ast_comment
|
|
252
|
+
optional: true # NULL when no comment precedes the declaration
|
|
161
253
|
- name: visibility
|
|
162
|
-
c_type:
|
|
254
|
+
c_type: attribute_visibility
|
|
255
|
+
locations:
|
|
256
|
+
- required: keyword
|
|
257
|
+
- required: name
|
|
258
|
+
- required: colon
|
|
259
|
+
- optional: kind
|
|
260
|
+
- optional: ivar
|
|
261
|
+
- optional: ivar_name
|
|
262
|
+
- optional: visibility
|
|
163
263
|
- name: RBS::AST::Members::AttrReader
|
|
264
|
+
rust_name: AttrReaderNode
|
|
164
265
|
fields:
|
|
165
266
|
- name: name
|
|
166
267
|
c_type: rbs_ast_symbol
|
|
167
268
|
- name: type
|
|
168
269
|
c_type: rbs_node
|
|
169
270
|
- name: ivar_name
|
|
170
|
-
c_type:
|
|
271
|
+
c_type: rbs_attr_ivar_name
|
|
171
272
|
- name: kind
|
|
172
|
-
c_type:
|
|
273
|
+
c_type: attribute_kind
|
|
173
274
|
- name: annotations
|
|
174
275
|
c_type: rbs_node_list
|
|
175
276
|
- name: comment
|
|
176
277
|
c_type: rbs_ast_comment
|
|
278
|
+
optional: true # NULL when no comment precedes the declaration
|
|
177
279
|
- name: visibility
|
|
178
|
-
c_type:
|
|
280
|
+
c_type: attribute_visibility
|
|
281
|
+
locations:
|
|
282
|
+
- required: keyword
|
|
283
|
+
- required: name
|
|
284
|
+
- required: colon
|
|
285
|
+
- optional: kind
|
|
286
|
+
- optional: ivar
|
|
287
|
+
- optional: ivar_name
|
|
288
|
+
- optional: visibility
|
|
179
289
|
- name: RBS::AST::Members::AttrWriter
|
|
290
|
+
rust_name: AttrWriterNode
|
|
180
291
|
fields:
|
|
181
292
|
- name: name
|
|
182
293
|
c_type: rbs_ast_symbol
|
|
183
294
|
- name: type
|
|
184
295
|
c_type: rbs_node
|
|
185
296
|
- name: ivar_name
|
|
186
|
-
c_type:
|
|
297
|
+
c_type: rbs_attr_ivar_name
|
|
187
298
|
- name: kind
|
|
188
|
-
c_type:
|
|
299
|
+
c_type: attribute_kind
|
|
189
300
|
- name: annotations
|
|
190
301
|
c_type: rbs_node_list
|
|
191
302
|
- name: comment
|
|
192
303
|
c_type: rbs_ast_comment
|
|
304
|
+
optional: true # NULL when no comment precedes the declaration
|
|
193
305
|
- name: visibility
|
|
194
|
-
c_type:
|
|
306
|
+
c_type: attribute_visibility
|
|
307
|
+
locations:
|
|
308
|
+
- required: keyword
|
|
309
|
+
- required: name
|
|
310
|
+
- required: colon
|
|
311
|
+
- optional: kind
|
|
312
|
+
- optional: ivar
|
|
313
|
+
- optional: ivar_name
|
|
314
|
+
- optional: visibility
|
|
195
315
|
- name: RBS::AST::Members::ClassInstanceVariable
|
|
316
|
+
rust_name: ClassInstanceVariableNode
|
|
196
317
|
fields:
|
|
197
318
|
- name: name
|
|
198
319
|
c_type: rbs_ast_symbol
|
|
@@ -200,7 +321,13 @@ nodes:
|
|
|
200
321
|
c_type: rbs_node
|
|
201
322
|
- name: comment
|
|
202
323
|
c_type: rbs_ast_comment
|
|
324
|
+
optional: true # NULL when no comment precedes the declaration
|
|
325
|
+
locations:
|
|
326
|
+
- required: name
|
|
327
|
+
- required: colon
|
|
328
|
+
- optional: kind
|
|
203
329
|
- name: RBS::AST::Members::ClassVariable
|
|
330
|
+
rust_name: ClassVariableNode
|
|
204
331
|
fields:
|
|
205
332
|
- name: name
|
|
206
333
|
c_type: rbs_ast_symbol
|
|
@@ -208,7 +335,13 @@ nodes:
|
|
|
208
335
|
c_type: rbs_node
|
|
209
336
|
- name: comment
|
|
210
337
|
c_type: rbs_ast_comment
|
|
338
|
+
optional: true # NULL when no comment precedes the declaration
|
|
339
|
+
locations:
|
|
340
|
+
- required: name
|
|
341
|
+
- required: colon
|
|
342
|
+
- optional: kind
|
|
211
343
|
- name: RBS::AST::Members::Extend
|
|
344
|
+
rust_name: ExtendNode
|
|
212
345
|
fields:
|
|
213
346
|
- name: name
|
|
214
347
|
c_type: rbs_type_name
|
|
@@ -218,7 +351,13 @@ nodes:
|
|
|
218
351
|
c_type: rbs_node_list
|
|
219
352
|
- name: comment
|
|
220
353
|
c_type: rbs_ast_comment
|
|
354
|
+
optional: true # NULL when no comment precedes the declaration
|
|
355
|
+
locations:
|
|
356
|
+
- required: name
|
|
357
|
+
- required: keyword
|
|
358
|
+
- optional: args
|
|
221
359
|
- name: RBS::AST::Members::Include
|
|
360
|
+
rust_name: IncludeNode
|
|
222
361
|
fields:
|
|
223
362
|
- name: name
|
|
224
363
|
c_type: rbs_type_name
|
|
@@ -228,7 +367,13 @@ nodes:
|
|
|
228
367
|
c_type: rbs_node_list
|
|
229
368
|
- name: comment
|
|
230
369
|
c_type: rbs_ast_comment
|
|
370
|
+
optional: true # NULL when no comment precedes the declaration
|
|
371
|
+
locations:
|
|
372
|
+
- required: name
|
|
373
|
+
- required: keyword
|
|
374
|
+
- optional: args
|
|
231
375
|
- name: RBS::AST::Members::InstanceVariable
|
|
376
|
+
rust_name: InstanceVariableNode
|
|
232
377
|
fields:
|
|
233
378
|
- name: name
|
|
234
379
|
c_type: rbs_ast_symbol
|
|
@@ -236,23 +381,37 @@ nodes:
|
|
|
236
381
|
c_type: rbs_node
|
|
237
382
|
- name: comment
|
|
238
383
|
c_type: rbs_ast_comment
|
|
384
|
+
optional: true # NULL when no comment precedes the declaration
|
|
385
|
+
locations:
|
|
386
|
+
- required: name
|
|
387
|
+
- required: colon
|
|
388
|
+
- optional: kind
|
|
239
389
|
- name: RBS::AST::Members::MethodDefinition
|
|
390
|
+
rust_name: MethodDefinitionNode
|
|
240
391
|
fields:
|
|
241
392
|
- name: name
|
|
242
393
|
c_type: rbs_ast_symbol
|
|
243
394
|
- name: kind
|
|
244
|
-
c_type:
|
|
395
|
+
c_type: method_definition_kind
|
|
245
396
|
- name: overloads
|
|
246
397
|
c_type: rbs_node_list
|
|
247
398
|
- name: annotations
|
|
248
399
|
c_type: rbs_node_list
|
|
249
400
|
- name: comment
|
|
250
401
|
c_type: rbs_ast_comment
|
|
402
|
+
optional: true # NULL when no comment precedes the declaration
|
|
251
403
|
- name: overloading
|
|
252
404
|
c_type: bool
|
|
253
405
|
- name: visibility
|
|
254
|
-
c_type:
|
|
406
|
+
c_type: method_definition_visibility
|
|
407
|
+
locations:
|
|
408
|
+
- required: keyword
|
|
409
|
+
- required: name
|
|
410
|
+
- optional: kind
|
|
411
|
+
- optional: overloading
|
|
412
|
+
- optional: visibility
|
|
255
413
|
- name: RBS::AST::Members::MethodDefinition::Overload
|
|
414
|
+
rust_name: MethodDefinitionOverloadNode
|
|
256
415
|
expose_location: false
|
|
257
416
|
fields:
|
|
258
417
|
- name: annotations
|
|
@@ -260,6 +419,7 @@ nodes:
|
|
|
260
419
|
- name: method_type
|
|
261
420
|
c_type: rbs_node
|
|
262
421
|
- name: RBS::AST::Members::Prepend
|
|
422
|
+
rust_name: PrependNode
|
|
263
423
|
fields:
|
|
264
424
|
- name: name
|
|
265
425
|
c_type: rbs_type_name
|
|
@@ -269,33 +429,56 @@ nodes:
|
|
|
269
429
|
c_type: rbs_node_list
|
|
270
430
|
- name: comment
|
|
271
431
|
c_type: rbs_ast_comment
|
|
432
|
+
optional: true # NULL when no comment precedes the declaration
|
|
433
|
+
locations:
|
|
434
|
+
- required: name
|
|
435
|
+
- required: keyword
|
|
436
|
+
- optional: args
|
|
272
437
|
- name: RBS::AST::Members::Private
|
|
438
|
+
rust_name: PrivateNode
|
|
273
439
|
- name: RBS::AST::Members::Public
|
|
440
|
+
rust_name: PublicNode
|
|
274
441
|
- name: RBS::AST::TypeParam
|
|
442
|
+
rust_name: TypeParamNode
|
|
275
443
|
fields:
|
|
276
444
|
- name: name
|
|
277
445
|
c_type: rbs_ast_symbol
|
|
278
446
|
- name: variance
|
|
279
|
-
c_type:
|
|
447
|
+
c_type: type_param_variance
|
|
280
448
|
- name: upper_bound
|
|
281
449
|
c_type: rbs_node
|
|
450
|
+
optional: true # NULL when no upper bound (e.g., `[T]` vs `[T < Bound]`)
|
|
451
|
+
- name: lower_bound
|
|
452
|
+
c_type: rbs_node
|
|
453
|
+
optional: true # NULL when no lower bound (e.g., `[T]` vs `[T > Bound]`)
|
|
282
454
|
- name: default_type
|
|
283
455
|
c_type: rbs_node
|
|
456
|
+
optional: true # NULL when no default (e.g., `[T]` vs `[T = Default]`)
|
|
284
457
|
- name: unchecked
|
|
285
458
|
c_type: bool
|
|
459
|
+
locations:
|
|
460
|
+
- required: name
|
|
461
|
+
- optional: variance
|
|
462
|
+
- optional: unchecked
|
|
463
|
+
- optional: upper_bound
|
|
464
|
+
- optional: lower_bound
|
|
465
|
+
- optional: default
|
|
286
466
|
- name: RBS::AST::Integer
|
|
467
|
+
rust_name: IntegerNode
|
|
287
468
|
expose_to_ruby: false
|
|
288
469
|
expose_location: false
|
|
289
470
|
fields:
|
|
290
471
|
- name: string_representation
|
|
291
472
|
c_type: rbs_string
|
|
292
473
|
- name: RBS::AST::String
|
|
474
|
+
rust_name: StringNode
|
|
293
475
|
expose_to_ruby: false
|
|
294
476
|
expose_location: false
|
|
295
477
|
fields:
|
|
296
478
|
- name: string
|
|
297
479
|
c_type: rbs_string
|
|
298
480
|
- name: RBS::MethodType
|
|
481
|
+
rust_name: MethodTypeNode
|
|
299
482
|
fields:
|
|
300
483
|
- name: type_params
|
|
301
484
|
c_type: rbs_node_list
|
|
@@ -303,7 +486,12 @@ nodes:
|
|
|
303
486
|
c_type: rbs_node
|
|
304
487
|
- name: block
|
|
305
488
|
c_type: rbs_types_block
|
|
489
|
+
optional: true # NULL when no block (e.g., `() -> void` vs `() { () -> void } -> void`)
|
|
490
|
+
locations:
|
|
491
|
+
- required: type
|
|
492
|
+
- optional: type_params
|
|
306
493
|
- name: RBS::Namespace
|
|
494
|
+
rust_name: NamespaceNode
|
|
307
495
|
expose_location: false
|
|
308
496
|
fields:
|
|
309
497
|
- name: path
|
|
@@ -311,6 +499,7 @@ nodes:
|
|
|
311
499
|
- name: absolute
|
|
312
500
|
c_type: bool
|
|
313
501
|
- name: RBS::Signature
|
|
502
|
+
rust_name: SignatureNode
|
|
314
503
|
expose_to_ruby: false
|
|
315
504
|
expose_location: false
|
|
316
505
|
fields:
|
|
@@ -319,6 +508,7 @@ nodes:
|
|
|
319
508
|
- name: declarations
|
|
320
509
|
c_type: rbs_node_list
|
|
321
510
|
- name: RBS::TypeName
|
|
511
|
+
rust_name: TypeNameNode
|
|
322
512
|
expose_location: false
|
|
323
513
|
fields:
|
|
324
514
|
- name: namespace
|
|
@@ -327,24 +517,38 @@ nodes:
|
|
|
327
517
|
- name: name
|
|
328
518
|
c_type: rbs_ast_symbol
|
|
329
519
|
- name: RBS::Types::Alias
|
|
520
|
+
rust_name: AliasTypeNode
|
|
330
521
|
fields:
|
|
331
522
|
- name: name
|
|
332
523
|
c_type: rbs_type_name
|
|
333
524
|
- name: args
|
|
334
525
|
c_type: rbs_node_list
|
|
526
|
+
locations:
|
|
527
|
+
- required: name
|
|
528
|
+
- optional: args
|
|
335
529
|
- name: RBS::Types::Bases::Any
|
|
530
|
+
rust_name: AnyTypeNode
|
|
336
531
|
fields:
|
|
337
532
|
- name: todo
|
|
338
533
|
c_type: bool
|
|
339
534
|
- name: RBS::Types::Bases::Bool
|
|
535
|
+
rust_name: BoolTypeNode
|
|
340
536
|
- name: RBS::Types::Bases::Bottom
|
|
537
|
+
rust_name: BottomTypeNode
|
|
341
538
|
- name: RBS::Types::Bases::Class
|
|
539
|
+
rust_name: ClassTypeNode
|
|
342
540
|
- name: RBS::Types::Bases::Instance
|
|
541
|
+
rust_name: InstanceTypeNode
|
|
343
542
|
- name: RBS::Types::Bases::Nil
|
|
543
|
+
rust_name: NilTypeNode
|
|
344
544
|
- name: RBS::Types::Bases::Self
|
|
545
|
+
rust_name: SelfTypeNode
|
|
345
546
|
- name: RBS::Types::Bases::Top
|
|
547
|
+
rust_name: TopTypeNode
|
|
346
548
|
- name: RBS::Types::Bases::Void
|
|
549
|
+
rust_name: VoidTypeNode
|
|
347
550
|
- name: RBS::Types::Block
|
|
551
|
+
rust_name: BlockTypeNode
|
|
348
552
|
expose_location: true
|
|
349
553
|
fields:
|
|
350
554
|
- name: type
|
|
@@ -353,17 +557,29 @@ nodes:
|
|
|
353
557
|
c_type: bool
|
|
354
558
|
- name: self_type
|
|
355
559
|
c_type: rbs_node
|
|
560
|
+
optional: true # NULL when no self binding (e.g., `{ () -> void }` vs `{ () [self: T] -> void }`)
|
|
356
561
|
- name: RBS::Types::ClassInstance
|
|
562
|
+
rust_name: ClassInstanceTypeNode
|
|
357
563
|
fields:
|
|
358
564
|
- name: name
|
|
359
565
|
c_type: rbs_type_name
|
|
360
566
|
- name: args
|
|
361
567
|
c_type: rbs_node_list
|
|
568
|
+
locations:
|
|
569
|
+
- required: name
|
|
570
|
+
- optional: args
|
|
362
571
|
- name: RBS::Types::ClassSingleton
|
|
572
|
+
rust_name: ClassSingletonTypeNode
|
|
363
573
|
fields:
|
|
364
574
|
- name: name
|
|
365
575
|
c_type: rbs_type_name
|
|
576
|
+
- name: args
|
|
577
|
+
c_type: rbs_node_list
|
|
578
|
+
locations:
|
|
579
|
+
- required: name
|
|
580
|
+
- optional: args
|
|
366
581
|
- name: RBS::Types::Function
|
|
582
|
+
rust_name: FunctionTypeNode
|
|
367
583
|
expose_location: false
|
|
368
584
|
fields:
|
|
369
585
|
- name: required_positionals
|
|
@@ -372,6 +588,7 @@ nodes:
|
|
|
372
588
|
c_type: rbs_node_list
|
|
373
589
|
- name: rest_positionals
|
|
374
590
|
c_type: rbs_node
|
|
591
|
+
optional: true # NULL when no splat (e.g., `(String) -> void` vs `(*String) -> void`)
|
|
375
592
|
- name: trailing_positionals
|
|
376
593
|
c_type: rbs_node_list
|
|
377
594
|
- name: required_keywords
|
|
@@ -380,45 +597,62 @@ nodes:
|
|
|
380
597
|
c_type: rbs_hash
|
|
381
598
|
- name: rest_keywords
|
|
382
599
|
c_type: rbs_node
|
|
600
|
+
optional: true # NULL when no double-splat (e.g., `() -> void` vs `(**String) -> void`)
|
|
383
601
|
- name: return_type
|
|
384
602
|
c_type: rbs_node
|
|
385
603
|
- name: RBS::Types::Function::Param
|
|
604
|
+
rust_name: FunctionParamNode
|
|
386
605
|
fields:
|
|
387
606
|
- name: type
|
|
388
607
|
c_type: rbs_node
|
|
389
608
|
- name: name
|
|
390
609
|
c_type: rbs_ast_symbol
|
|
610
|
+
optional: true # NULL when param is unnamed (e.g., `(String) -> void` vs `(String name) -> void`)
|
|
611
|
+
locations:
|
|
612
|
+
- optional: name
|
|
391
613
|
- name: RBS::Types::Interface
|
|
614
|
+
rust_name: InterfaceTypeNode
|
|
392
615
|
fields:
|
|
393
616
|
- name: name
|
|
394
617
|
c_type: rbs_type_name
|
|
395
618
|
- name: args
|
|
396
619
|
c_type: rbs_node_list
|
|
620
|
+
locations:
|
|
621
|
+
- required: name
|
|
622
|
+
- optional: args
|
|
397
623
|
- name: RBS::Types::Intersection
|
|
624
|
+
rust_name: IntersectionTypeNode
|
|
398
625
|
fields:
|
|
399
626
|
- name: types
|
|
400
627
|
c_type: rbs_node_list
|
|
401
628
|
- name: RBS::Types::Literal
|
|
629
|
+
rust_name: LiteralTypeNode
|
|
402
630
|
fields:
|
|
403
631
|
- name: literal
|
|
404
632
|
c_type: rbs_node
|
|
405
633
|
- name: RBS::Types::Optional
|
|
634
|
+
rust_name: OptionalTypeNode
|
|
406
635
|
fields:
|
|
407
636
|
- name: type
|
|
408
637
|
c_type: rbs_node
|
|
409
638
|
- name: RBS::Types::Proc
|
|
639
|
+
rust_name: ProcTypeNode
|
|
410
640
|
fields:
|
|
411
641
|
- name: type
|
|
412
642
|
c_type: rbs_node
|
|
413
643
|
- name: block
|
|
414
644
|
c_type: rbs_types_block
|
|
645
|
+
optional: true # NULL when proc has no block (e.g., `^() -> void` vs `^() { () -> void } -> void`)
|
|
415
646
|
- name: self_type
|
|
416
647
|
c_type: rbs_node
|
|
648
|
+
optional: true # NULL when no self binding (e.g., `^() -> void` vs `^() [self: T] -> void`)
|
|
417
649
|
- name: RBS::Types::Record
|
|
650
|
+
rust_name: RecordTypeNode
|
|
418
651
|
fields:
|
|
419
652
|
- name: all_fields
|
|
420
653
|
c_type: rbs_hash
|
|
421
654
|
- name: RBS::Types::Record::FieldType
|
|
655
|
+
rust_name: RecordFieldTypeNode
|
|
422
656
|
expose_to_ruby: false
|
|
423
657
|
expose_location: false
|
|
424
658
|
fields:
|
|
@@ -427,61 +661,229 @@ nodes:
|
|
|
427
661
|
- name: required
|
|
428
662
|
c_type: bool
|
|
429
663
|
- name: RBS::Types::Tuple
|
|
664
|
+
rust_name: TupleTypeNode
|
|
430
665
|
fields:
|
|
431
666
|
- name: types
|
|
432
667
|
c_type: rbs_node_list
|
|
433
668
|
- name: RBS::Types::Union
|
|
669
|
+
rust_name: UnionTypeNode
|
|
434
670
|
fields:
|
|
435
671
|
- name: types
|
|
436
672
|
c_type: rbs_node_list
|
|
437
673
|
- name: RBS::Types::UntypedFunction
|
|
674
|
+
rust_name: UntypedFunctionTypeNode
|
|
438
675
|
expose_location: false
|
|
439
676
|
fields:
|
|
440
677
|
- name: return_type
|
|
441
678
|
c_type: rbs_node
|
|
442
679
|
- name: RBS::Types::Variable
|
|
680
|
+
rust_name: VariableTypeNode
|
|
443
681
|
fields:
|
|
444
682
|
- name: name
|
|
445
683
|
c_type: rbs_ast_symbol
|
|
446
684
|
- name: RBS::AST::Ruby::Annotations::NodeTypeAssertion
|
|
685
|
+
rust_name: NodeTypeAssertionNode
|
|
447
686
|
fields:
|
|
448
687
|
- name: prefix_location
|
|
449
|
-
c_type:
|
|
688
|
+
c_type: rbs_location_range
|
|
450
689
|
- name: type
|
|
451
690
|
c_type: rbs_node
|
|
452
691
|
- name: RBS::AST::Ruby::Annotations::ColonMethodTypeAnnotation
|
|
692
|
+
rust_name: ColonMethodTypeAnnotationNode
|
|
453
693
|
fields:
|
|
454
694
|
- name: prefix_location
|
|
455
|
-
c_type:
|
|
695
|
+
c_type: rbs_location_range
|
|
456
696
|
- name: annotations
|
|
457
697
|
c_type: rbs_node_list
|
|
458
698
|
- name: method_type
|
|
459
699
|
c_type: rbs_node
|
|
460
700
|
- name: RBS::AST::Ruby::Annotations::MethodTypesAnnotation
|
|
701
|
+
rust_name: MethodTypesAnnotationNode
|
|
461
702
|
fields:
|
|
462
703
|
- name: prefix_location
|
|
463
|
-
c_type:
|
|
704
|
+
c_type: rbs_location_range
|
|
464
705
|
- name: overloads
|
|
465
706
|
c_type: rbs_node_list
|
|
466
707
|
- name: vertical_bar_locations
|
|
467
|
-
c_type:
|
|
708
|
+
c_type: rbs_location_range_list
|
|
709
|
+
- name: dot3_location
|
|
710
|
+
c_type: rbs_location_range
|
|
711
|
+
optional: true
|
|
468
712
|
- name: RBS::AST::Ruby::Annotations::SkipAnnotation
|
|
713
|
+
rust_name: SkipAnnotationNode
|
|
469
714
|
fields:
|
|
470
715
|
- name: prefix_location
|
|
471
|
-
c_type:
|
|
716
|
+
c_type: rbs_location_range
|
|
472
717
|
- name: skip_location
|
|
473
|
-
c_type:
|
|
718
|
+
c_type: rbs_location_range
|
|
474
719
|
- name: comment_location
|
|
475
|
-
c_type:
|
|
720
|
+
c_type: rbs_location_range
|
|
721
|
+
optional: true
|
|
476
722
|
- name: RBS::AST::Ruby::Annotations::ReturnTypeAnnotation
|
|
723
|
+
rust_name: ReturnTypeAnnotationNode
|
|
477
724
|
fields:
|
|
478
725
|
- name: prefix_location
|
|
479
|
-
c_type:
|
|
726
|
+
c_type: rbs_location_range
|
|
480
727
|
- name: return_location
|
|
481
|
-
c_type:
|
|
728
|
+
c_type: rbs_location_range
|
|
482
729
|
- name: colon_location
|
|
483
|
-
c_type:
|
|
730
|
+
c_type: rbs_location_range
|
|
484
731
|
- name: return_type
|
|
485
732
|
c_type: rbs_node
|
|
486
733
|
- name: comment_location
|
|
487
|
-
c_type:
|
|
734
|
+
c_type: rbs_location_range
|
|
735
|
+
optional: true
|
|
736
|
+
- name: RBS::AST::Ruby::Annotations::TypeApplicationAnnotation
|
|
737
|
+
rust_name: TypeApplicationAnnotationNode
|
|
738
|
+
fields:
|
|
739
|
+
- name: prefix_location
|
|
740
|
+
c_type: rbs_location_range
|
|
741
|
+
- name: type_args
|
|
742
|
+
c_type: rbs_node_list
|
|
743
|
+
- name: close_bracket_location
|
|
744
|
+
c_type: rbs_location_range
|
|
745
|
+
- name: comma_locations
|
|
746
|
+
c_type: rbs_location_range_list
|
|
747
|
+
- name: RBS::AST::Ruby::Annotations::InstanceVariableAnnotation
|
|
748
|
+
rust_name: InstanceVariableAnnotationNode
|
|
749
|
+
fields:
|
|
750
|
+
- name: prefix_location
|
|
751
|
+
c_type: rbs_location_range
|
|
752
|
+
- name: ivar_name
|
|
753
|
+
c_type: rbs_ast_symbol
|
|
754
|
+
- name: ivar_name_location
|
|
755
|
+
c_type: rbs_location_range
|
|
756
|
+
- name: colon_location
|
|
757
|
+
c_type: rbs_location_range
|
|
758
|
+
- name: type
|
|
759
|
+
c_type: rbs_node
|
|
760
|
+
- name: comment_location
|
|
761
|
+
c_type: rbs_location_range
|
|
762
|
+
optional: true
|
|
763
|
+
- name: RBS::AST::Ruby::Annotations::ClassAliasAnnotation
|
|
764
|
+
rust_name: ClassAliasAnnotationNode
|
|
765
|
+
fields:
|
|
766
|
+
- name: prefix_location
|
|
767
|
+
c_type: rbs_location_range
|
|
768
|
+
- name: keyword_location
|
|
769
|
+
c_type: rbs_location_range
|
|
770
|
+
- name: type_name
|
|
771
|
+
c_type: rbs_type_name
|
|
772
|
+
- name: type_name_location
|
|
773
|
+
c_type: rbs_location_range
|
|
774
|
+
optional: true
|
|
775
|
+
- name: RBS::AST::Ruby::Annotations::ModuleAliasAnnotation
|
|
776
|
+
rust_name: ModuleAliasAnnotationNode
|
|
777
|
+
fields:
|
|
778
|
+
- name: prefix_location
|
|
779
|
+
c_type: rbs_location_range
|
|
780
|
+
- name: keyword_location
|
|
781
|
+
c_type: rbs_location_range
|
|
782
|
+
- name: type_name
|
|
783
|
+
c_type: rbs_type_name
|
|
784
|
+
- name: type_name_location
|
|
785
|
+
c_type: rbs_location_range
|
|
786
|
+
optional: true
|
|
787
|
+
- name: RBS::AST::Ruby::Annotations::ParamTypeAnnotation
|
|
788
|
+
rust_name: ParamTypeAnnotationNode
|
|
789
|
+
fields:
|
|
790
|
+
- name: prefix_location
|
|
791
|
+
c_type: rbs_location_range
|
|
792
|
+
- name: name_location
|
|
793
|
+
c_type: rbs_location_range
|
|
794
|
+
- name: colon_location
|
|
795
|
+
c_type: rbs_location_range
|
|
796
|
+
- name: param_type
|
|
797
|
+
c_type: rbs_node
|
|
798
|
+
- name: comment_location
|
|
799
|
+
c_type: rbs_location_range
|
|
800
|
+
optional: true
|
|
801
|
+
- name: RBS::AST::Ruby::Annotations::SplatParamTypeAnnotation
|
|
802
|
+
rust_name: SplatParamTypeAnnotationNode
|
|
803
|
+
fields:
|
|
804
|
+
- name: prefix_location
|
|
805
|
+
c_type: rbs_location_range
|
|
806
|
+
- name: star_location
|
|
807
|
+
c_type: rbs_location_range
|
|
808
|
+
- name: name_location
|
|
809
|
+
c_type: rbs_location_range
|
|
810
|
+
optional: true
|
|
811
|
+
- name: colon_location
|
|
812
|
+
c_type: rbs_location_range
|
|
813
|
+
- name: param_type
|
|
814
|
+
c_type: rbs_node
|
|
815
|
+
- name: comment_location
|
|
816
|
+
c_type: rbs_location_range
|
|
817
|
+
optional: true
|
|
818
|
+
- name: RBS::AST::Ruby::Annotations::DoubleSplatParamTypeAnnotation
|
|
819
|
+
rust_name: DoubleSplatParamTypeAnnotationNode
|
|
820
|
+
fields:
|
|
821
|
+
- name: prefix_location
|
|
822
|
+
c_type: rbs_location_range
|
|
823
|
+
- name: star2_location
|
|
824
|
+
c_type: rbs_location_range
|
|
825
|
+
- name: name_location
|
|
826
|
+
c_type: rbs_location_range
|
|
827
|
+
optional: true
|
|
828
|
+
- name: colon_location
|
|
829
|
+
c_type: rbs_location_range
|
|
830
|
+
- name: param_type
|
|
831
|
+
c_type: rbs_node
|
|
832
|
+
- name: comment_location
|
|
833
|
+
c_type: rbs_location_range
|
|
834
|
+
optional: true
|
|
835
|
+
- name: RBS::AST::Ruby::Annotations::BlockParamTypeAnnotation
|
|
836
|
+
rust_name: BlockParamTypeAnnotationNode
|
|
837
|
+
fields:
|
|
838
|
+
- name: prefix_location
|
|
839
|
+
c_type: rbs_location_range
|
|
840
|
+
- name: ampersand_location
|
|
841
|
+
c_type: rbs_location_range
|
|
842
|
+
- name: name_location
|
|
843
|
+
c_type: rbs_location_range
|
|
844
|
+
optional: true
|
|
845
|
+
- name: colon_location
|
|
846
|
+
c_type: rbs_location_range
|
|
847
|
+
- name: question_location
|
|
848
|
+
c_type: rbs_location_range
|
|
849
|
+
optional: true
|
|
850
|
+
- name: type_location
|
|
851
|
+
c_type: rbs_location_range
|
|
852
|
+
- name: type
|
|
853
|
+
c_name: type_
|
|
854
|
+
c_type: rbs_node
|
|
855
|
+
- name: comment_location
|
|
856
|
+
c_type: rbs_location_range
|
|
857
|
+
optional: true
|
|
858
|
+
|
|
859
|
+
enums:
|
|
860
|
+
attribute_visibility:
|
|
861
|
+
optional: true
|
|
862
|
+
symbols:
|
|
863
|
+
- unspecified
|
|
864
|
+
- public
|
|
865
|
+
- private
|
|
866
|
+
attribute_kind:
|
|
867
|
+
symbols:
|
|
868
|
+
- instance
|
|
869
|
+
- singleton
|
|
870
|
+
alias_kind:
|
|
871
|
+
symbols:
|
|
872
|
+
- instance
|
|
873
|
+
- singleton
|
|
874
|
+
method_definition_kind:
|
|
875
|
+
symbols:
|
|
876
|
+
- instance
|
|
877
|
+
- singleton
|
|
878
|
+
- singleton_instance
|
|
879
|
+
method_definition_visibility:
|
|
880
|
+
optional: true
|
|
881
|
+
symbols:
|
|
882
|
+
- unspecified
|
|
883
|
+
- public
|
|
884
|
+
- private
|
|
885
|
+
type_param_variance:
|
|
886
|
+
symbols:
|
|
887
|
+
- invariant
|
|
888
|
+
- covariant
|
|
889
|
+
- contravariant
|