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