rbs 3.0.0.dev.1 → 3.0.0.dev.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/comments.yml +2 -1
- data/.github/workflows/ruby.yml +4 -3
- data/CHANGELOG.md +28 -0
- data/Gemfile.lock +12 -12
- data/README.md +1 -0
- data/Rakefile +77 -3
- data/Steepfile +1 -1
- data/core/array.rbs +574 -424
- data/core/basic_object.rbs +11 -39
- data/core/binding.rbs +1 -1
- data/core/builtin.rbs +9 -1
- data/core/class.rbs +37 -0
- data/core/comparable.rbs +7 -18
- data/core/complex.rbs +2 -2
- data/core/data.rbs +419 -0
- data/core/dir.rbs +52 -104
- data/core/encoding.rbs +22 -181
- data/core/enumerable.rbs +212 -175
- data/core/enumerator/product.rbs +96 -0
- data/core/enumerator.rbs +57 -8
- data/core/errors.rbs +8 -2
- data/core/exception.rbs +41 -0
- data/core/fiber.rbs +95 -12
- data/core/file.rbs +840 -275
- data/core/file_test.rbs +34 -19
- data/core/float.rbs +40 -96
- data/core/gc.rbs +15 -3
- data/core/hash.rbs +114 -176
- data/core/integer.rbs +85 -145
- data/core/io/buffer.rbs +187 -60
- data/core/io/wait.rbs +28 -16
- data/core/io.rbs +1859 -1389
- data/core/kernel.rbs +525 -961
- data/core/match_data.rbs +306 -142
- data/core/math.rbs +506 -234
- data/core/method.rbs +0 -24
- data/core/module.rbs +111 -18
- data/core/nil_class.rbs +2 -0
- data/core/numeric.rbs +76 -144
- data/core/object.rbs +88 -212
- data/core/proc.rbs +17 -5
- data/core/process.rbs +22 -5
- data/core/ractor.rbs +1 -1
- data/core/random.rbs +20 -3
- data/core/range.rbs +91 -89
- data/core/rational.rbs +2 -3
- data/core/rbs/unnamed/argf.rbs +177 -120
- data/core/rbs/unnamed/env_class.rbs +89 -163
- data/core/rbs/unnamed/random.rbs +36 -12
- data/core/refinement.rbs +8 -0
- data/core/regexp.rbs +462 -272
- data/core/ruby_vm.rbs +210 -0
- data/{stdlib/set/0 → core}/set.rbs +43 -47
- data/core/string.rbs +1403 -1332
- data/core/string_io.rbs +191 -107
- data/core/struct.rbs +67 -63
- data/core/symbol.rbs +187 -201
- data/core/thread.rbs +40 -35
- data/core/time.rbs +902 -826
- data/core/trace_point.rbs +55 -6
- data/core/unbound_method.rbs +48 -24
- data/docs/collection.md +4 -0
- data/docs/syntax.md +55 -0
- data/ext/rbs_extension/constants.c +16 -2
- data/ext/rbs_extension/constants.h +8 -1
- data/ext/rbs_extension/extconf.rb +1 -1
- data/ext/rbs_extension/lexer.c +834 -777
- data/ext/rbs_extension/lexer.h +3 -1
- data/ext/rbs_extension/lexer.re +3 -1
- data/ext/rbs_extension/lexstate.c +4 -2
- data/ext/rbs_extension/parser.c +262 -43
- data/ext/rbs_extension/ruby_objs.c +56 -2
- data/ext/rbs_extension/ruby_objs.h +7 -1
- data/lib/rbs/annotate/rdoc_annotator.rb +1 -1
- data/lib/rbs/ast/declarations.rb +49 -2
- data/lib/rbs/ast/directives.rb +39 -0
- data/lib/rbs/cli.rb +38 -19
- data/lib/rbs/collection/cleaner.rb +8 -1
- data/lib/rbs/collection/config/lockfile.rb +3 -1
- data/lib/rbs/collection/config/lockfile_generator.rb +37 -30
- data/lib/rbs/collection/config.rb +3 -3
- data/lib/rbs/collection/sources/git.rb +10 -3
- data/lib/rbs/collection/sources/local.rb +79 -0
- data/lib/rbs/collection/sources.rb +8 -1
- data/lib/rbs/definition_builder/ancestor_builder.rb +24 -8
- data/lib/rbs/definition_builder.rb +8 -8
- data/lib/rbs/environment/use_map.rb +77 -0
- data/lib/rbs/environment.rb +358 -88
- data/lib/rbs/environment_loader.rb +12 -9
- data/lib/rbs/environment_walker.rb +1 -1
- data/lib/rbs/errors.rb +52 -37
- data/lib/rbs/locator.rb +27 -8
- data/lib/rbs/parser_aux.rb +8 -6
- data/lib/rbs/resolver/constant_resolver.rb +23 -7
- data/lib/rbs/resolver/type_name_resolver.rb +2 -1
- data/lib/rbs/sorter.rb +5 -5
- data/lib/rbs/test/setup.rb +1 -1
- data/lib/rbs/type_alias_dependency.rb +1 -1
- data/lib/rbs/type_alias_regularity.rb +3 -3
- data/lib/rbs/validator.rb +23 -2
- data/lib/rbs/variance_calculator.rb +2 -2
- data/lib/rbs/version.rb +1 -1
- data/lib/rbs/writer.rb +28 -2
- data/lib/rbs.rb +2 -2
- data/lib/rdoc_plugin/parser.rb +2 -2
- data/rbs.gemspec +1 -1
- data/sig/ancestor_graph.rbs +22 -2
- data/sig/collection/config/lockfile_generator.rbs +8 -10
- data/sig/collection/config.rbs +1 -1
- data/sig/collection/sources.rbs +44 -9
- data/sig/constant.rbs +1 -1
- data/sig/declarations.rbs +36 -3
- data/sig/definition.rbs +1 -1
- data/sig/definition_builder.rbs +0 -1
- data/sig/directives.rbs +61 -0
- data/sig/environment.rbs +150 -29
- data/sig/environment_loader.rbs +1 -1
- data/sig/errors.rbs +22 -1
- data/sig/locator.rbs +14 -2
- data/sig/parser.rbs +8 -15
- data/sig/resolver/constant_resolver.rbs +1 -2
- data/sig/shims/{abstract_syntax_tree.rbs → _abstract_syntax_tree.rbs} +0 -0
- data/sig/shims/bundler.rbs +18 -0
- data/sig/shims/rubygems.rbs +6 -0
- data/sig/use_map.rbs +35 -0
- data/sig/validator.rbs +12 -5
- data/sig/writer.rbs +4 -2
- data/stdlib/bigdecimal/0/big_decimal.rbs +16 -13
- data/stdlib/cgi/0/core.rbs +16 -0
- data/stdlib/coverage/0/coverage.rbs +50 -8
- data/stdlib/csv/0/csv.rbs +1 -1
- data/stdlib/date/0/date.rbs +856 -726
- data/stdlib/date/0/date_time.rbs +83 -210
- data/stdlib/erb/0/erb.rbs +13 -36
- data/stdlib/etc/0/etc.rbs +127 -20
- data/stdlib/fileutils/0/fileutils.rbs +1290 -381
- data/stdlib/logger/0/logger.rbs +466 -316
- data/stdlib/net-http/0/net-http.rbs +2211 -534
- data/stdlib/nkf/0/nkf.rbs +5 -5
- data/stdlib/objspace/0/objspace.rbs +31 -14
- data/stdlib/openssl/0/openssl.rbs +11 -7
- data/stdlib/optparse/0/optparse.rbs +20 -17
- data/stdlib/pathname/0/pathname.rbs +21 -4
- data/stdlib/pstore/0/pstore.rbs +378 -154
- data/stdlib/pty/0/pty.rbs +24 -8
- data/stdlib/ripper/0/ripper.rbs +1650 -0
- data/stdlib/socket/0/addrinfo.rbs +9 -15
- data/stdlib/socket/0/socket.rbs +36 -3
- data/stdlib/strscan/0/string_scanner.rbs +7 -5
- data/stdlib/tempfile/0/tempfile.rbs +104 -44
- data/stdlib/time/0/time.rbs +2 -2
- data/stdlib/uri/0/file.rbs +5 -0
- data/stdlib/uri/0/generic.rbs +2 -2
- data/stdlib/yaml/0/yaml.rbs +2 -2
- data/stdlib/zlib/0/zlib.rbs +1 -1
- metadata +13 -13
- data/core/deprecated.rbs +0 -9
- data/lib/rbs/constant_table.rb +0 -167
- data/lib/rbs/type_name_resolver.rb +0 -67
- data/sig/constant_table.rbs +0 -30
- data/sig/shims/ripper.rbs +0 -8
- data/sig/type_name_resolver.rbs +0 -26
- data/steep/Gemfile +0 -3
- data/steep/Gemfile.lock +0 -61
data/core/trace_point.rbs
CHANGED
@@ -114,7 +114,7 @@ class TracePoint < Object
|
|
114
114
|
|
115
115
|
# <!--
|
116
116
|
# rdoc-file=trace_point.rb
|
117
|
-
# - TracePoint.allow_reentry
|
117
|
+
# - TracePoint.allow_reentry { block }
|
118
118
|
# -->
|
119
119
|
# In general, while a TracePoint callback is running, other registered callbacks
|
120
120
|
# are not called to avoid confusion by reentrance. This method allows the
|
@@ -124,6 +124,54 @@ class TracePoint < Object
|
|
124
124
|
# If this method is called when the reentrance is already allowed, it raises a
|
125
125
|
# RuntimeError.
|
126
126
|
#
|
127
|
+
# **Example:**
|
128
|
+
#
|
129
|
+
# # Without reentry
|
130
|
+
# # ---------------
|
131
|
+
#
|
132
|
+
# line_handler = TracePoint.new(:line) do |tp|
|
133
|
+
# next if tp.path != __FILE__ # only work in this file
|
134
|
+
# puts "Line handler"
|
135
|
+
# binding.eval("class C; end")
|
136
|
+
# end.enable
|
137
|
+
#
|
138
|
+
# class_handler = TracePoint.new(:class) do |tp|
|
139
|
+
# puts "Class handler"
|
140
|
+
# end.enable
|
141
|
+
#
|
142
|
+
# class B
|
143
|
+
# end
|
144
|
+
#
|
145
|
+
# # This script will print "Class handler" only once: when inside :line
|
146
|
+
# # handler, all other handlers are ignored
|
147
|
+
#
|
148
|
+
# # With reentry
|
149
|
+
# # ------------
|
150
|
+
#
|
151
|
+
# line_handler = TracePoint.new(:line) do |tp|
|
152
|
+
# next if tp.path != __FILE__ # only work in this file
|
153
|
+
# next if (__LINE__..__LINE__+3).cover?(tp.lineno) # don't be invoked from itself
|
154
|
+
# puts "Line handler"
|
155
|
+
# TracePoint.allow_reentry { binding.eval("class C; end") }
|
156
|
+
# end.enable
|
157
|
+
#
|
158
|
+
# class_handler = TracePoint.new(:class) do |tp|
|
159
|
+
# puts "Class handler"
|
160
|
+
# end.enable
|
161
|
+
#
|
162
|
+
# class B
|
163
|
+
# end
|
164
|
+
#
|
165
|
+
# # This wil print "Class handler" twice: inside allow_reentry block in :line
|
166
|
+
# # handler, other handlers are enabled.
|
167
|
+
#
|
168
|
+
# Note that the example shows the principal effect of the method, but its
|
169
|
+
# practical usage is for debugging libraries that sometimes require other
|
170
|
+
# libraries hooks to not be affected by debugger being inside trace point
|
171
|
+
# handling. Precautions should be taken against infinite recursion in this case
|
172
|
+
# (note that we needed to filter out calls by itself from :line handler,
|
173
|
+
# otherwise it will call itself infinitely).
|
174
|
+
#
|
127
175
|
def self.allow_reentry: () { () -> void } -> void
|
128
176
|
|
129
177
|
# <!--
|
@@ -163,7 +211,7 @@ class TracePoint < Object
|
|
163
211
|
# binding of the nearest Ruby method calling the C method, since C methods
|
164
212
|
# themselves do not have bindings.
|
165
213
|
#
|
166
|
-
def binding: () -> Binding
|
214
|
+
def binding: () -> Binding?
|
167
215
|
|
168
216
|
# <!--
|
169
217
|
# rdoc-file=trace_point.rb
|
@@ -251,7 +299,7 @@ class TracePoint < Object
|
|
251
299
|
# <!--
|
252
300
|
# rdoc-file=trace_point.rb
|
253
301
|
# - trace.enable(target: nil, target_line: nil, target_thread: nil) -> true or false
|
254
|
-
# - trace.enable(target: nil, target_line: nil, target_thread:
|
302
|
+
# - trace.enable(target: nil, target_line: nil, target_thread: :default) { block } -> obj
|
255
303
|
# -->
|
256
304
|
# Activates the trace.
|
257
305
|
#
|
@@ -264,15 +312,16 @@ class TracePoint < Object
|
|
264
312
|
# trace.enable #=> true (previous state)
|
265
313
|
# # trace is still enabled
|
266
314
|
#
|
267
|
-
# If a block is given, the trace will only be enabled
|
268
|
-
#
|
315
|
+
# If a block is given, the trace will only be enabled during the block call. If
|
316
|
+
# target and target_line are both nil, then target_thread will default to the
|
317
|
+
# current thread if a block is given.
|
269
318
|
#
|
270
319
|
# trace.enabled?
|
271
320
|
# #=> false
|
272
321
|
#
|
273
322
|
# trace.enable do
|
274
323
|
# trace.enabled?
|
275
|
-
# # only enabled for this block
|
324
|
+
# # only enabled for this block and thread
|
276
325
|
# end
|
277
326
|
#
|
278
327
|
# trace.enabled?
|
data/core/unbound_method.rbs
CHANGED
@@ -46,6 +46,22 @@
|
|
46
46
|
# um.bind(t).call #=> :original
|
47
47
|
#
|
48
48
|
class UnboundMethod
|
49
|
+
# <!--
|
50
|
+
# rdoc-file=proc.c
|
51
|
+
# - meth.eql?(other_meth) -> true or false
|
52
|
+
# - meth == other_meth -> true or false
|
53
|
+
# -->
|
54
|
+
# Two unbound method objects are equal if they refer to the same method
|
55
|
+
# definition.
|
56
|
+
#
|
57
|
+
# Array.instance_method(:each_slice) == Enumerable.instance_method(:each_slice)
|
58
|
+
# #=> true
|
59
|
+
#
|
60
|
+
# Array.instance_method(:sum) == Enumerable.instance_method(:sum)
|
61
|
+
# #=> false, Array redefines the method for efficiency
|
62
|
+
#
|
63
|
+
def ==: (untyped) -> bool
|
64
|
+
|
49
65
|
# <!--
|
50
66
|
# rdoc-file=proc.c
|
51
67
|
# - method.clone -> new_method
|
@@ -141,6 +157,38 @@ class UnboundMethod
|
|
141
157
|
#
|
142
158
|
def bind: (untyped obj) -> Method
|
143
159
|
|
160
|
+
# <!--
|
161
|
+
# rdoc-file=proc.c
|
162
|
+
# - meth.to_s -> string
|
163
|
+
# - meth.inspect -> string
|
164
|
+
# -->
|
165
|
+
# Returns a human-readable description of the underlying method.
|
166
|
+
#
|
167
|
+
# "cat".method(:count).inspect #=> "#<Method: String#count(*)>"
|
168
|
+
# (1..3).method(:map).inspect #=> "#<Method: Range(Enumerable)#map()>"
|
169
|
+
#
|
170
|
+
# In the latter case, the method description includes the "owner" of the
|
171
|
+
# original method (`Enumerable` module, which is included into `Range`).
|
172
|
+
#
|
173
|
+
# `inspect` also provides, when possible, method argument names (call sequence)
|
174
|
+
# and source location.
|
175
|
+
#
|
176
|
+
# require 'net/http'
|
177
|
+
# Net::HTTP.method(:get).inspect
|
178
|
+
# #=> "#<Method: Net::HTTP.get(uri_or_host, path=..., port=...) <skip>/lib/ruby/2.7.0/net/http.rb:457>"
|
179
|
+
#
|
180
|
+
# `...` in argument definition means argument is optional (has some default
|
181
|
+
# value).
|
182
|
+
#
|
183
|
+
# For methods defined in C (language core and extensions), location and argument
|
184
|
+
# names can't be extracted, and only generic information is provided in form of
|
185
|
+
# `*` (any number of arguments) or `_` (some positional argument).
|
186
|
+
#
|
187
|
+
# "cat".method(:count).inspect #=> "#<Method: String#count(*)>"
|
188
|
+
# "cat".method(:+).inspect #=> "#<Method: String#+(_)>""
|
189
|
+
#
|
190
|
+
def inspect: () -> String
|
191
|
+
|
144
192
|
# <!--
|
145
193
|
# rdoc-file=proc.c
|
146
194
|
# - meth.name -> symbol
|
@@ -188,30 +236,6 @@ class UnboundMethod
|
|
188
236
|
def parameters: () -> ::Array[[ Symbol, Symbol ]]
|
189
237
|
| () -> ::Array[[ Symbol ]]
|
190
238
|
|
191
|
-
# <!--
|
192
|
-
# rdoc-file=proc.c
|
193
|
-
# - meth.private? -> true or false
|
194
|
-
# -->
|
195
|
-
# Returns whether the method is private.
|
196
|
-
#
|
197
|
-
def private?: () -> bool
|
198
|
-
|
199
|
-
# <!--
|
200
|
-
# rdoc-file=proc.c
|
201
|
-
# - meth.protected? -> true or false
|
202
|
-
# -->
|
203
|
-
# Returns whether the method is protected.
|
204
|
-
#
|
205
|
-
def protected?: () -> bool
|
206
|
-
|
207
|
-
# <!--
|
208
|
-
# rdoc-file=proc.c
|
209
|
-
# - meth.public? -> true or false
|
210
|
-
# -->
|
211
|
-
# Returns whether the method is public.
|
212
|
-
#
|
213
|
-
def public?: () -> bool
|
214
|
-
|
215
239
|
# <!--
|
216
240
|
# rdoc-file=proc.c
|
217
241
|
# - meth.source_location -> [String, Integer]
|
data/docs/collection.md
CHANGED
data/docs/syntax.md
CHANGED
@@ -501,6 +501,8 @@ private alias foo bar # Syntax error
|
|
501
501
|
```markdown
|
502
502
|
_decl_ ::= _class-decl_ # Class declaration
|
503
503
|
| _module-decl_ # Module declaration
|
504
|
+
| _class-alias-decl_ # Class alias declaration
|
505
|
+
| _module-alias-decl_ # Module alias declaration
|
504
506
|
| _interface-decl_ # Interface declaration
|
505
507
|
| _type-alias-decl_ # Type alias declaration
|
506
508
|
| _const-decl_ # Constant declaration
|
@@ -512,6 +514,10 @@ _class-decl_ ::= `class` _class-name_ _module-type-parameters_ _members_ `end`
|
|
512
514
|
_module-decl_ ::= `module` _module-name_ _module-type-parameters_ _members_ `end`
|
513
515
|
| `module` _module-name_ _module-type-parameters_ `:` _module-self-types_ _members_ `end`
|
514
516
|
|
517
|
+
_class-alias-decl_ ::= `class` _class-name_ `=` _class-name_
|
518
|
+
|
519
|
+
_module-alias-decl_ ::= `module` _module-name_ `=` _module-name_
|
520
|
+
|
515
521
|
_module-self-types_ ::= _class-name_ _type-arguments_ `,` _module-self-types_ (Class instance)
|
516
522
|
| _interface-name_ _type-arguments_ `,` _module-self-types_ (Interface)
|
517
523
|
|
@@ -554,6 +560,32 @@ end
|
|
554
560
|
|
555
561
|
The `Enumerable` module above requires `each` method for enumerating objects.
|
556
562
|
|
563
|
+
### Class/module alias declaration
|
564
|
+
|
565
|
+
An alias of a class or module can be defined in RBS.
|
566
|
+
|
567
|
+
```rbs
|
568
|
+
module Foo = Kernel
|
569
|
+
|
570
|
+
class Bar = Array
|
571
|
+
```
|
572
|
+
|
573
|
+
The syntax defines a class and the definition is equivalent to the right-hand-side.
|
574
|
+
|
575
|
+
```
|
576
|
+
class Baz < Bar[String] # Class alias can be inherited
|
577
|
+
include Foo # Module alias can be included
|
578
|
+
end
|
579
|
+
```
|
580
|
+
|
581
|
+
This is a definition corresponding to the following Ruby code.
|
582
|
+
|
583
|
+
```ruby
|
584
|
+
Foo = Kernel
|
585
|
+
|
586
|
+
Bar = Array
|
587
|
+
```
|
588
|
+
|
557
589
|
### Interface declaration
|
558
590
|
|
559
591
|
Interface declaration can have parameters but allows only a few of the members.
|
@@ -696,6 +728,29 @@ type int_printer = PrettyPrint[Integer] # Type error
|
|
696
728
|
|
697
729
|
The upper bound must be one of a class instance type, interface type, or class singleton type.
|
698
730
|
|
731
|
+
### Directives
|
732
|
+
|
733
|
+
Directives are placed at the top of a file and provides per-file-basis features.
|
734
|
+
|
735
|
+
```
|
736
|
+
_use-directive_ ::= `use` _use-clauses_
|
737
|
+
|
738
|
+
_use-clauses_ ::= _use-clause_ `,` ... `,` _use-clause_
|
739
|
+
|
740
|
+
_use-clause_ ::= _type-name_ # Single use clause
|
741
|
+
| _type-name_ `as` _simple-type-name_ # Single use clause with alias
|
742
|
+
| _namespace_ # Wildcard use clause
|
743
|
+
```
|
744
|
+
|
745
|
+
The *use directive* defines relative type names that is an alias of other type names.
|
746
|
+
We can use the simple type names if it is declared with *use*.
|
747
|
+
|
748
|
+
```
|
749
|
+
use RBS::Namespace # => Defines `Namespace`
|
750
|
+
use RBS::TypeName as TN # => Defines `TN`
|
751
|
+
use RBS::AST::* # => Defines modules under `::RBS::AST::` namespace
|
752
|
+
```
|
753
|
+
|
699
754
|
### Comments
|
700
755
|
|
701
756
|
You can write single line comments. Comments must be on their own line. Comments can lead with whitespace.
|
@@ -10,7 +10,7 @@ VALUE RBS_AST_TypeParam;
|
|
10
10
|
|
11
11
|
VALUE RBS_AST_Declarations;
|
12
12
|
|
13
|
-
VALUE
|
13
|
+
VALUE RBS_AST_Declarations_TypeAlias;
|
14
14
|
VALUE RBS_AST_Declarations_Constant;
|
15
15
|
VALUE RBS_AST_Declarations_Global;
|
16
16
|
VALUE RBS_AST_Declarations_Interface;
|
@@ -18,6 +18,13 @@ VALUE RBS_AST_Declarations_Module;
|
|
18
18
|
VALUE RBS_AST_Declarations_Module_Self;
|
19
19
|
VALUE RBS_AST_Declarations_Class;
|
20
20
|
VALUE RBS_AST_Declarations_Class_Super;
|
21
|
+
VALUE RBS_AST_Declarations_ModuleAlias;
|
22
|
+
VALUE RBS_AST_Declarations_ClassAlias;
|
23
|
+
|
24
|
+
VALUE RBS_AST_Directives;
|
25
|
+
VALUE RBS_AST_Directives_Use;
|
26
|
+
VALUE RBS_AST_Directives_Use_SingleClause;
|
27
|
+
VALUE RBS_AST_Directives_Use_WildcardClause;
|
21
28
|
|
22
29
|
VALUE RBS_AST_Members;
|
23
30
|
VALUE RBS_AST_Members_Alias;
|
@@ -80,7 +87,7 @@ void rbs__init_constants(void) {
|
|
80
87
|
|
81
88
|
RBS_AST_Declarations = rb_const_get(RBS_AST, rb_intern("Declarations"));
|
82
89
|
|
83
|
-
|
90
|
+
RBS_AST_Declarations_TypeAlias = rb_const_get(RBS_AST_Declarations, rb_intern("TypeAlias"));
|
84
91
|
RBS_AST_Declarations_Constant = rb_const_get(RBS_AST_Declarations, rb_intern("Constant"));
|
85
92
|
RBS_AST_Declarations_Global = rb_const_get(RBS_AST_Declarations, rb_intern("Global"));
|
86
93
|
RBS_AST_Declarations_Interface = rb_const_get(RBS_AST_Declarations, rb_intern("Interface"));
|
@@ -88,6 +95,13 @@ void rbs__init_constants(void) {
|
|
88
95
|
RBS_AST_Declarations_Module_Self = rb_const_get(RBS_AST_Declarations_Module, rb_intern("Self"));
|
89
96
|
RBS_AST_Declarations_Class = rb_const_get(RBS_AST_Declarations, rb_intern("Class"));
|
90
97
|
RBS_AST_Declarations_Class_Super = rb_const_get(RBS_AST_Declarations_Class, rb_intern("Super"));
|
98
|
+
RBS_AST_Declarations_ClassAlias = rb_const_get(RBS_AST_Declarations, rb_intern("ClassAlias"));
|
99
|
+
RBS_AST_Declarations_ModuleAlias = rb_const_get(RBS_AST_Declarations, rb_intern("ModuleAlias"));
|
100
|
+
|
101
|
+
RBS_AST_Directives = rb_const_get(RBS_AST, rb_intern("Directives"));
|
102
|
+
RBS_AST_Directives_Use = rb_const_get(RBS_AST_Directives, rb_intern("Use"));
|
103
|
+
RBS_AST_Directives_Use_SingleClause = rb_const_get(RBS_AST_Directives_Use, rb_intern("SingleClause"));
|
104
|
+
RBS_AST_Directives_Use_WildcardClause = rb_const_get(RBS_AST_Directives_Use, rb_intern("WildcardClause"));
|
91
105
|
|
92
106
|
RBS_AST_Members = rb_const_get(RBS_AST, rb_intern("Members"));
|
93
107
|
RBS_AST_Members_Alias = rb_const_get(RBS_AST_Members, rb_intern("Alias"));
|
@@ -9,7 +9,7 @@ extern VALUE RBS_AST_Comment;
|
|
9
9
|
extern VALUE RBS_AST_TypeParam;
|
10
10
|
|
11
11
|
extern VALUE RBS_AST_Declarations;
|
12
|
-
extern VALUE
|
12
|
+
extern VALUE RBS_AST_Declarations_TypeAlias;
|
13
13
|
extern VALUE RBS_AST_Declarations_Class_Super;
|
14
14
|
extern VALUE RBS_AST_Declarations_Class;
|
15
15
|
extern VALUE RBS_AST_Declarations_Constant;
|
@@ -17,6 +17,13 @@ extern VALUE RBS_AST_Declarations_Global;
|
|
17
17
|
extern VALUE RBS_AST_Declarations_Interface;
|
18
18
|
extern VALUE RBS_AST_Declarations_Module_Self;
|
19
19
|
extern VALUE RBS_AST_Declarations_Module;
|
20
|
+
extern VALUE RBS_AST_Declarations_ModuleAlias;
|
21
|
+
extern VALUE RBS_AST_Declarations_ClassAlias;
|
22
|
+
|
23
|
+
extern VALUE RBS_AST_Directives;
|
24
|
+
extern VALUE RBS_AST_Directives_Use;
|
25
|
+
extern VALUE RBS_AST_Directives_Use_SingleClause;
|
26
|
+
extern VALUE RBS_AST_Directives_Use_WildcardClause;
|
20
27
|
|
21
28
|
extern VALUE RBS_AST_Members;
|
22
29
|
extern VALUE RBS_AST_Members_Alias;
|