rbs 3.0.0.dev.1 → 3.0.0.dev.3

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.
Files changed (165) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/comments.yml +2 -1
  3. data/.github/workflows/ruby.yml +4 -3
  4. data/CHANGELOG.md +28 -0
  5. data/Gemfile.lock +12 -12
  6. data/README.md +1 -0
  7. data/Rakefile +77 -3
  8. data/Steepfile +1 -1
  9. data/core/array.rbs +574 -424
  10. data/core/basic_object.rbs +11 -39
  11. data/core/binding.rbs +1 -1
  12. data/core/builtin.rbs +9 -1
  13. data/core/class.rbs +37 -0
  14. data/core/comparable.rbs +7 -18
  15. data/core/complex.rbs +2 -2
  16. data/core/data.rbs +419 -0
  17. data/core/dir.rbs +52 -104
  18. data/core/encoding.rbs +22 -181
  19. data/core/enumerable.rbs +212 -175
  20. data/core/enumerator/product.rbs +96 -0
  21. data/core/enumerator.rbs +57 -8
  22. data/core/errors.rbs +8 -2
  23. data/core/exception.rbs +41 -0
  24. data/core/fiber.rbs +95 -12
  25. data/core/file.rbs +840 -275
  26. data/core/file_test.rbs +34 -19
  27. data/core/float.rbs +40 -96
  28. data/core/gc.rbs +15 -3
  29. data/core/hash.rbs +114 -176
  30. data/core/integer.rbs +85 -145
  31. data/core/io/buffer.rbs +187 -60
  32. data/core/io/wait.rbs +28 -16
  33. data/core/io.rbs +1859 -1389
  34. data/core/kernel.rbs +525 -961
  35. data/core/match_data.rbs +306 -142
  36. data/core/math.rbs +506 -234
  37. data/core/method.rbs +0 -24
  38. data/core/module.rbs +111 -18
  39. data/core/nil_class.rbs +2 -0
  40. data/core/numeric.rbs +76 -144
  41. data/core/object.rbs +88 -212
  42. data/core/proc.rbs +17 -5
  43. data/core/process.rbs +22 -5
  44. data/core/ractor.rbs +1 -1
  45. data/core/random.rbs +20 -3
  46. data/core/range.rbs +91 -89
  47. data/core/rational.rbs +2 -3
  48. data/core/rbs/unnamed/argf.rbs +177 -120
  49. data/core/rbs/unnamed/env_class.rbs +89 -163
  50. data/core/rbs/unnamed/random.rbs +36 -12
  51. data/core/refinement.rbs +8 -0
  52. data/core/regexp.rbs +462 -272
  53. data/core/ruby_vm.rbs +210 -0
  54. data/{stdlib/set/0 → core}/set.rbs +43 -47
  55. data/core/string.rbs +1403 -1332
  56. data/core/string_io.rbs +191 -107
  57. data/core/struct.rbs +67 -63
  58. data/core/symbol.rbs +187 -201
  59. data/core/thread.rbs +40 -35
  60. data/core/time.rbs +902 -826
  61. data/core/trace_point.rbs +55 -6
  62. data/core/unbound_method.rbs +48 -24
  63. data/docs/collection.md +4 -0
  64. data/docs/syntax.md +55 -0
  65. data/ext/rbs_extension/constants.c +16 -2
  66. data/ext/rbs_extension/constants.h +8 -1
  67. data/ext/rbs_extension/extconf.rb +1 -1
  68. data/ext/rbs_extension/lexer.c +834 -777
  69. data/ext/rbs_extension/lexer.h +3 -1
  70. data/ext/rbs_extension/lexer.re +3 -1
  71. data/ext/rbs_extension/lexstate.c +4 -2
  72. data/ext/rbs_extension/parser.c +262 -43
  73. data/ext/rbs_extension/ruby_objs.c +56 -2
  74. data/ext/rbs_extension/ruby_objs.h +7 -1
  75. data/lib/rbs/annotate/rdoc_annotator.rb +1 -1
  76. data/lib/rbs/ast/declarations.rb +49 -2
  77. data/lib/rbs/ast/directives.rb +39 -0
  78. data/lib/rbs/cli.rb +38 -19
  79. data/lib/rbs/collection/cleaner.rb +8 -1
  80. data/lib/rbs/collection/config/lockfile.rb +3 -1
  81. data/lib/rbs/collection/config/lockfile_generator.rb +37 -30
  82. data/lib/rbs/collection/config.rb +3 -3
  83. data/lib/rbs/collection/sources/git.rb +10 -3
  84. data/lib/rbs/collection/sources/local.rb +79 -0
  85. data/lib/rbs/collection/sources.rb +8 -1
  86. data/lib/rbs/definition_builder/ancestor_builder.rb +24 -8
  87. data/lib/rbs/definition_builder.rb +8 -8
  88. data/lib/rbs/environment/use_map.rb +77 -0
  89. data/lib/rbs/environment.rb +358 -88
  90. data/lib/rbs/environment_loader.rb +12 -9
  91. data/lib/rbs/environment_walker.rb +1 -1
  92. data/lib/rbs/errors.rb +52 -37
  93. data/lib/rbs/locator.rb +27 -8
  94. data/lib/rbs/parser_aux.rb +8 -6
  95. data/lib/rbs/resolver/constant_resolver.rb +23 -7
  96. data/lib/rbs/resolver/type_name_resolver.rb +2 -1
  97. data/lib/rbs/sorter.rb +5 -5
  98. data/lib/rbs/test/setup.rb +1 -1
  99. data/lib/rbs/type_alias_dependency.rb +1 -1
  100. data/lib/rbs/type_alias_regularity.rb +3 -3
  101. data/lib/rbs/validator.rb +23 -2
  102. data/lib/rbs/variance_calculator.rb +2 -2
  103. data/lib/rbs/version.rb +1 -1
  104. data/lib/rbs/writer.rb +28 -2
  105. data/lib/rbs.rb +2 -2
  106. data/lib/rdoc_plugin/parser.rb +2 -2
  107. data/rbs.gemspec +1 -1
  108. data/sig/ancestor_graph.rbs +22 -2
  109. data/sig/collection/config/lockfile_generator.rbs +8 -10
  110. data/sig/collection/config.rbs +1 -1
  111. data/sig/collection/sources.rbs +44 -9
  112. data/sig/constant.rbs +1 -1
  113. data/sig/declarations.rbs +36 -3
  114. data/sig/definition.rbs +1 -1
  115. data/sig/definition_builder.rbs +0 -1
  116. data/sig/directives.rbs +61 -0
  117. data/sig/environment.rbs +150 -29
  118. data/sig/environment_loader.rbs +1 -1
  119. data/sig/errors.rbs +22 -1
  120. data/sig/locator.rbs +14 -2
  121. data/sig/parser.rbs +8 -15
  122. data/sig/resolver/constant_resolver.rbs +1 -2
  123. data/sig/shims/{abstract_syntax_tree.rbs → _abstract_syntax_tree.rbs} +0 -0
  124. data/sig/shims/bundler.rbs +18 -0
  125. data/sig/shims/rubygems.rbs +6 -0
  126. data/sig/use_map.rbs +35 -0
  127. data/sig/validator.rbs +12 -5
  128. data/sig/writer.rbs +4 -2
  129. data/stdlib/bigdecimal/0/big_decimal.rbs +16 -13
  130. data/stdlib/cgi/0/core.rbs +16 -0
  131. data/stdlib/coverage/0/coverage.rbs +50 -8
  132. data/stdlib/csv/0/csv.rbs +1 -1
  133. data/stdlib/date/0/date.rbs +856 -726
  134. data/stdlib/date/0/date_time.rbs +83 -210
  135. data/stdlib/erb/0/erb.rbs +13 -36
  136. data/stdlib/etc/0/etc.rbs +127 -20
  137. data/stdlib/fileutils/0/fileutils.rbs +1290 -381
  138. data/stdlib/logger/0/logger.rbs +466 -316
  139. data/stdlib/net-http/0/net-http.rbs +2211 -534
  140. data/stdlib/nkf/0/nkf.rbs +5 -5
  141. data/stdlib/objspace/0/objspace.rbs +31 -14
  142. data/stdlib/openssl/0/openssl.rbs +11 -7
  143. data/stdlib/optparse/0/optparse.rbs +20 -17
  144. data/stdlib/pathname/0/pathname.rbs +21 -4
  145. data/stdlib/pstore/0/pstore.rbs +378 -154
  146. data/stdlib/pty/0/pty.rbs +24 -8
  147. data/stdlib/ripper/0/ripper.rbs +1650 -0
  148. data/stdlib/socket/0/addrinfo.rbs +9 -15
  149. data/stdlib/socket/0/socket.rbs +36 -3
  150. data/stdlib/strscan/0/string_scanner.rbs +7 -5
  151. data/stdlib/tempfile/0/tempfile.rbs +104 -44
  152. data/stdlib/time/0/time.rbs +2 -2
  153. data/stdlib/uri/0/file.rbs +5 -0
  154. data/stdlib/uri/0/generic.rbs +2 -2
  155. data/stdlib/yaml/0/yaml.rbs +2 -2
  156. data/stdlib/zlib/0/zlib.rbs +1 -1
  157. metadata +13 -13
  158. data/core/deprecated.rbs +0 -9
  159. data/lib/rbs/constant_table.rb +0 -167
  160. data/lib/rbs/type_name_resolver.rb +0 -67
  161. data/sig/constant_table.rbs +0 -30
  162. data/sig/shims/ripper.rbs +0 -8
  163. data/sig/type_name_resolver.rbs +0 -26
  164. data/steep/Gemfile +0 -3
  165. 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: nil) { block } -> obj
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 within the scope of the
268
- # block.
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?
@@ -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
@@ -79,6 +79,10 @@ sources:
79
79
  revision: main
80
80
  repo_dir: gems
81
81
 
82
+ # You can also add a local path as a collection source optionaly.
83
+ - type: local
84
+ path: path/to/local/dir
85
+
82
86
  # A directory to install the downloaded RBSs
83
87
  path: .gem_rbs_collection
84
88
 
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 RBS_AST_Declarations_Alias;
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
- RBS_AST_Declarations_Alias = rb_const_get(RBS_AST_Declarations, rb_intern("Alias"));
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 RBS_AST_Declarations_Alias;
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;
@@ -1,4 +1,4 @@
1
1
  require 'mkmf'
2
2
  $INCFLAGS << " -I$(top_srcdir)" if $extmk
3
- append_cflags ['-std=c99']
3
+ append_cflags ['-std=gnu99']
4
4
  create_makefile 'rbs_extension'