rbs 1.6.1 → 1.7.0.beta.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/ruby.yml +18 -3
- data/.gitignore +10 -1
- data/CHANGELOG.md +25 -0
- data/Gemfile +1 -0
- data/Rakefile +22 -22
- data/core/enumerator.rbs +1 -0
- data/core/io.rbs +1 -1
- data/core/kernel.rbs +4 -4
- data/core/trace_point.rbs +1 -1
- data/ext/rbs_extension/constants.c +139 -0
- data/ext/rbs_extension/constants.h +72 -0
- data/ext/rbs_extension/extconf.rb +3 -0
- data/ext/rbs_extension/lexer.c +2533 -0
- data/ext/rbs_extension/lexer.h +161 -0
- data/ext/rbs_extension/lexer.re +140 -0
- data/ext/rbs_extension/lexstate.c +139 -0
- data/ext/rbs_extension/location.c +295 -0
- data/ext/rbs_extension/location.h +59 -0
- data/ext/rbs_extension/main.c +9 -0
- data/ext/rbs_extension/parser.c +2390 -0
- data/ext/rbs_extension/parser.h +18 -0
- data/ext/rbs_extension/parserstate.c +313 -0
- data/ext/rbs_extension/parserstate.h +141 -0
- data/ext/rbs_extension/rbs_extension.h +40 -0
- data/ext/rbs_extension/ruby_objs.c +521 -0
- data/ext/rbs_extension/ruby_objs.h +46 -0
- data/ext/rbs_extension/unescape.c +65 -0
- data/goodcheck.yml +1 -1
- data/lib/rbs/ast/comment.rb +0 -12
- data/lib/rbs/buffer.rb +4 -0
- data/lib/rbs/cli.rb +5 -8
- data/lib/rbs/collection/installer.rb +1 -0
- data/lib/rbs/collection/sources/git.rb +18 -3
- data/lib/rbs/errors.rb +28 -1
- data/lib/rbs/location.rb +221 -217
- data/lib/rbs/location_aux.rb +121 -0
- data/lib/rbs/locator.rb +10 -7
- data/lib/rbs/parser_aux.rb +63 -0
- data/lib/rbs/parser_compat/lexer_error.rb +4 -0
- data/lib/rbs/parser_compat/located_value.rb +5 -0
- data/lib/rbs/parser_compat/semantics_error.rb +4 -0
- data/lib/rbs/parser_compat/syntax_error.rb +4 -0
- data/lib/rbs/types.rb +2 -3
- data/lib/rbs/version.rb +1 -1
- data/lib/rbs/writer.rb +4 -2
- data/lib/rbs.rb +14 -7
- data/rbs.gemspec +2 -1
- data/sig/ancestor_builder.rbs +2 -2
- data/sig/annotation.rbs +2 -2
- data/sig/comment.rbs +7 -7
- data/sig/constant_table.rbs +1 -1
- data/sig/declarations.rbs +9 -9
- data/sig/definition.rbs +1 -1
- data/sig/definition_builder.rbs +2 -2
- data/sig/errors.rbs +40 -25
- data/sig/location.rbs +46 -78
- data/sig/locator.rbs +2 -2
- data/sig/members.rbs +7 -7
- data/sig/method_types.rbs +3 -3
- data/sig/parser.rbs +15 -20
- data/sig/rbs.rbs +4 -0
- data/sig/types.rbs +45 -27
- data/sig/writer.rbs +1 -1
- data/stdlib/io-console/0/io-console.rbs +137 -0
- data/stdlib/json/0/json.rbs +3 -3
- data/stdlib/net-http/0/net-http.rbs +2 -1
- data/stdlib/tempfile/0/tempfile.rbs +4 -6
- metadata +32 -7
- data/lib/rbs/parser.rb +0 -3614
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7486f2fc540fa8039a9729a4447016b7c730f9460647c2b8c441a1df75aba708
|
4
|
+
data.tar.gz: 0c2d486cd334b46eb101c3b5a6bf4724c7029bf9da95069bbfedbe001c4d4c04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9050aadaf5538fc9f1d132619df96da6039f3dc13e961a5c7fc75e9a7087d9aafe4db0be0e1bd545c1d870f180d8ecef38f071e7c8add8056e32bc8ba72fdce0
|
7
|
+
data.tar.gz: 333011168ba724f6c12fa37d8df906e253578060d2e5ef7c54ba0373a5e22d1f665339e5c08c80fa39d2d9aef459f8a8f95b4378d93385c0b5f7c81124d94b47
|
data/.github/workflows/ruby.yml
CHANGED
@@ -15,14 +15,18 @@ jobs:
|
|
15
15
|
- master-nightly-focal
|
16
16
|
- 3.0-focal
|
17
17
|
- 2.7-bionic
|
18
|
+
- 2.6-bionic
|
18
19
|
job:
|
19
20
|
- test
|
20
21
|
- stdlib_test
|
21
22
|
- rubocop validate test_doc build test_generate_stdlib
|
22
|
-
-
|
23
|
+
- lexer confirm_lexer
|
24
|
+
- lexer compile
|
23
25
|
exclude:
|
24
26
|
- container_tag: master-nightly-focal
|
25
|
-
job:
|
27
|
+
job: confirm_lexer
|
28
|
+
- container_tag: 2.6-bionic
|
29
|
+
job: stdlib_test
|
26
30
|
container:
|
27
31
|
image: rubylang/ruby:${{ matrix.container_tag }}
|
28
32
|
steps:
|
@@ -30,7 +34,18 @@ jobs:
|
|
30
34
|
- name: Install dependencies
|
31
35
|
run: |
|
32
36
|
apt-get update
|
33
|
-
apt-get install -y libdb-dev
|
37
|
+
apt-get install -y libdb-dev curl autoconf automake m4 libtool
|
38
|
+
- name: Install Re2c
|
39
|
+
if: contains(matrix.job, 'lexer')
|
40
|
+
run: |
|
41
|
+
cd /tmp
|
42
|
+
curl -L https://github.com/skvadrik/re2c/archive/refs/tags/2.2.tar.gz > re2c-2.2.tar.gz
|
43
|
+
tar xf re2c-2.2.tar.gz
|
44
|
+
cd re2c-2.2
|
45
|
+
autoreconf -i -W all
|
46
|
+
./configure
|
47
|
+
make
|
48
|
+
make install
|
34
49
|
- name: Update rubygems & bundler
|
35
50
|
run: |
|
36
51
|
ruby -v
|
data/.gitignore
CHANGED
@@ -1,13 +1,22 @@
|
|
1
1
|
/.bundle/
|
2
|
+
/vendor/bundle/
|
2
3
|
/steep/.bundle/
|
4
|
+
/steep/vendor/bundle/
|
3
5
|
/.yardoc
|
4
6
|
/_yardoc/
|
5
7
|
/coverage/
|
6
8
|
/pkg/
|
7
9
|
/spec/reports/
|
8
10
|
/tmp/
|
9
|
-
|
11
|
+
**/.ruby-version
|
12
|
+
**/.rvmrc
|
13
|
+
**/.rbfu-version
|
14
|
+
**/.rbenv-version
|
15
|
+
**/.versions.conf
|
10
16
|
/lib/rbs/parser.output
|
11
17
|
/vendor/sigs
|
12
18
|
/Gemfile.lock
|
13
19
|
|
20
|
+
lib/**/*.bundle
|
21
|
+
lib/**/*.so
|
22
|
+
lib/**/*.dll
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,31 @@
|
|
2
2
|
|
3
3
|
## master
|
4
4
|
|
5
|
+
## 1.7.0 (beta.3)
|
6
|
+
|
7
|
+
## Signature updates
|
8
|
+
|
9
|
+
* io/console ([\#783](https://github.com/ruby/rbs/pull/783))
|
10
|
+
* `Net::HTTPRequest` ([\#784](https://github.com/ruby/rbs/pull/784))
|
11
|
+
* `Tempfile.new`, `Tempfile.create` ([\#792](https://github.com/ruby/rbs/pull/792), [\#791](https://github.com/ruby/rbs/pull/791))
|
12
|
+
|
13
|
+
## Library changes
|
14
|
+
|
15
|
+
* Fix unexpected `CollectionNotAvailable` without `gems` from git source ([\#795](https://github.com/ruby/rbs/pull/795))
|
16
|
+
* Replace RBS::Parser ([#788](https://github.com/ruby/rbs/pull/788), [#789](https://github.com/ruby/rbs/pull/789))
|
17
|
+
* Print deprecation warning ([\#801](https://github.com/ruby/rbs/pull/801))
|
18
|
+
|
19
|
+
## 1.6.2 (2021-09-09)
|
20
|
+
|
21
|
+
## Signature updates
|
22
|
+
|
23
|
+
* `Enumerator::Lazy#force` ([\#782](https://github.com/ruby/rbs/pull/782))
|
24
|
+
* `IO.readlines` ([\#780](https://github.com/ruby/rbs/pull/780))
|
25
|
+
|
26
|
+
## Miscellaneous
|
27
|
+
|
28
|
+
* Set `$XDG_CACHE_HOME` during test ([\#781](https://github.com/ruby/rbs/pull/781))
|
29
|
+
|
5
30
|
## 1.6.1 (2021-09-05)
|
6
31
|
|
7
32
|
This is a minor release including test fixes.
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -1,15 +1,17 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
2
|
require "rake/testtask"
|
3
3
|
require "rbconfig"
|
4
|
+
require 'rake/extensiontask'
|
4
5
|
|
5
6
|
$LOAD_PATH << File.join(__dir__, "test")
|
6
7
|
|
7
8
|
ruby = ENV["RUBY"] || RbConfig.ruby
|
8
|
-
racc = ENV.fetch("RACC", "racc")
|
9
9
|
rbs = File.join(__dir__, "exe/rbs")
|
10
10
|
bin = File.join(__dir__, "bin")
|
11
11
|
|
12
|
-
Rake::
|
12
|
+
Rake::ExtensionTask.new("rbs_extension")
|
13
|
+
|
14
|
+
Rake::TestTask.new(:test => :compile) do |t|
|
13
15
|
t.libs << "test"
|
14
16
|
t.libs << "lib"
|
15
17
|
t.test_files = FileList["test/**/*_test.rb"].reject do |path|
|
@@ -19,7 +21,22 @@ end
|
|
19
21
|
|
20
22
|
multitask :default => [:test, :stdlib_test, :rubocop, :validate, :test_doc]
|
21
23
|
|
22
|
-
task :
|
24
|
+
task :lexer do
|
25
|
+
sh "re2c -W --no-generation-date -o ext/rbs_extension/lexer.c ext/rbs_extension/lexer.re"
|
26
|
+
end
|
27
|
+
|
28
|
+
task :confirm_lexer => :lexer do
|
29
|
+
puts "Testing if lexer.c is updated with respect to lexer.re"
|
30
|
+
sh "git diff --exit-code ext/rbs_extension/lexer.c"
|
31
|
+
end
|
32
|
+
|
33
|
+
rule ".c" => ".re" do |t|
|
34
|
+
puts "⚠️⚠️⚠️ #{t.name} is older than #{t.source}. You may need to run `rake lexer` ⚠️⚠️⚠️"
|
35
|
+
end
|
36
|
+
|
37
|
+
task :compile => "ext/rbs_extension/lexer.c"
|
38
|
+
|
39
|
+
task :test_doc do
|
23
40
|
files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
24
41
|
`git ls-files -z`.split("\x0").select do |file| Pathname(file).extname == ".md" end
|
25
42
|
end
|
@@ -27,7 +44,7 @@ task :test_doc => :parser do
|
|
27
44
|
sh "#{ruby} #{__dir__}/bin/run_in_md.rb #{files.join(" ")}"
|
28
45
|
end
|
29
46
|
|
30
|
-
task :validate => :
|
47
|
+
task :validate => :compile do
|
31
48
|
sh "#{ruby} #{rbs} validate --silent"
|
32
49
|
|
33
50
|
FileList["stdlib/*"].each do |path|
|
@@ -72,7 +89,7 @@ task :validate => :parser do
|
|
72
89
|
end
|
73
90
|
|
74
91
|
FileList["test/stdlib/**/*_test.rb"].each do |test|
|
75
|
-
task test => :
|
92
|
+
task test => :compile do
|
76
93
|
sh "#{ruby} -Ilib #{bin}/test_runner.rb #{test}"
|
77
94
|
end
|
78
95
|
task stdlib_test: test
|
@@ -82,21 +99,6 @@ task :rubocop do
|
|
82
99
|
sh "rubocop --parallel"
|
83
100
|
end
|
84
101
|
|
85
|
-
rule ".rb" => ".y" do |t|
|
86
|
-
sh "#{racc} -v -o #{t.name} #{t.source}"
|
87
|
-
end
|
88
|
-
|
89
|
-
task :parser => "lib/rbs/parser.rb"
|
90
|
-
task :test => :parser
|
91
|
-
task :stdlib_test => :parser
|
92
|
-
task :build => :parser
|
93
|
-
|
94
|
-
task :confirm_parser do
|
95
|
-
puts "Testing if parser.rb is updated with respect to parser.y"
|
96
|
-
sh "#{racc} -v -o lib/rbs/parser.rb lib/rbs/parser.y"
|
97
|
-
sh "git diff --exit-code lib/rbs/parser.rb"
|
98
|
-
end
|
99
|
-
|
100
102
|
namespace :generate do
|
101
103
|
desc "Generate a test file for a stdlib class signatures"
|
102
104
|
task :stdlib_test, [:class] do |_task, args|
|
@@ -225,5 +227,3 @@ task :test_generate_stdlib do
|
|
225
227
|
sh "RBS_GENERATE_TEST_PATH=/tmp/Array_test.rb rake 'generate:stdlib_test[Array]'"
|
226
228
|
sh "ruby -c /tmp/Array_test.rb"
|
227
229
|
end
|
228
|
-
|
229
|
-
CLEAN.include("lib/rbs/parser.rb")
|
data/core/enumerator.rbs
CHANGED
data/core/io.rbs
CHANGED
@@ -749,7 +749,7 @@ class IO < Object
|
|
749
749
|
|
750
750
|
def self.read: (String name, ?Integer length, ?Integer offset, ?external_encoding: String external_encoding, ?internal_encoding: String internal_encoding, ?encoding: String encoding, ?textmode: untyped textmode, ?binmode: untyped binmode, ?autoclose: untyped autoclose, ?mode: String mode) -> String
|
751
751
|
|
752
|
-
def self.readlines: (String name, ?String sep, ?Integer limit, ?external_encoding: String external_encoding, ?internal_encoding: String internal_encoding, ?encoding: String encoding, ?textmode: untyped textmode, ?binmode: untyped binmode, ?autoclose: untyped autoclose, ?mode: String mode) -> ::Array[String]
|
752
|
+
def self.readlines: (String name, ?String sep, ?Integer limit, ?external_encoding: String external_encoding, ?internal_encoding: String internal_encoding, ?encoding: String encoding, ?textmode: untyped textmode, ?binmode: untyped binmode, ?autoclose: untyped autoclose, ?mode: String mode, ?chomp: boolish) -> ::Array[String]
|
753
753
|
|
754
754
|
def self.select: [X, Y, Z] (::Array[X & io]? read_array, ?::Array[Y & io]? write_array, ?::Array[Z & io]? error_array) -> [Array[X], Array[Y], Array[Z]]
|
755
755
|
| [X, Y, Z] (::Array[X & io]? read_array, ?::Array[Y & io]? write_array, ?::Array[Z & io]? error_array, Numeric? timeout) -> [Array[X], Array[Y], Array[Z]]?
|
data/core/kernel.rbs
CHANGED
@@ -482,8 +482,8 @@ module Kernel : BasicObject
|
|
482
482
|
| [:child, int] # redirect to the redirected file descriptor
|
483
483
|
| :close # close the file descriptor in child process
|
484
484
|
|
485
|
-
def self?.spawn: (String command, *String args, ?unsetenv_others: boolish, ?pgroup
|
486
|
-
| (Hash[string, string?] env, String command, *String args, ?unsetenv_others: boolish, ?pgroup
|
485
|
+
def self?.spawn: (String command, *String args, ?unsetenv_others: boolish, ?pgroup: (true | Integer), ?umask: Integer, ?in: redirect_fd, ?out: redirect_fd, ?err: redirect_fd, ?close_others: boolish, ?chdir: String) -> Integer
|
486
|
+
| (Hash[string, string?] env, String command, *String args, ?unsetenv_others: boolish, ?pgroup: (true | Integer), ?umask: Integer, ?in: redirect_fd, ?out: redirect_fd, ?err: redirect_fd, ?close_others: boolish, ?chdir: String) -> Integer
|
487
487
|
|
488
488
|
# Executes *command…* in a subshell. *command…* is one of following forms.
|
489
489
|
#
|
@@ -510,8 +510,8 @@ module Kernel : BasicObject
|
|
510
510
|
# *
|
511
511
|
#
|
512
512
|
# See `Kernel.exec` for the standard shell.
|
513
|
-
def self?.system: (String command, *String args, ?unsetenv_others: boolish, ?pgroup
|
514
|
-
| (Hash[string, string?] env, String command, *String args, ?unsetenv_others: boolish, ?pgroup
|
513
|
+
def self?.system: (String command, *String args, ?unsetenv_others: boolish, ?pgroup: (true | Integer), ?umask: Integer, ?in: redirect_fd, ?out: redirect_fd, ?err: redirect_fd, ?close_others: boolish, ?chdir: String) -> (NilClass | FalseClass | TrueClass)
|
514
|
+
| (Hash[string, string?] env, String command, *String args, ?unsetenv_others: boolish, ?pgroup: (true | Integer), ?umask: Integer, ?in: redirect_fd, ?out: redirect_fd, ?err: redirect_fd, ?close_others: boolish, ?chdir: String) -> (NilClass | FalseClass | TrueClass)
|
515
515
|
end
|
516
516
|
|
517
517
|
Kernel::RUBYGEMS_ACTIVATION_MONITOR: untyped
|
data/core/trace_point.rbs
CHANGED
@@ -0,0 +1,139 @@
|
|
1
|
+
#include "rbs_extension.h"
|
2
|
+
|
3
|
+
VALUE RBS_Parser;
|
4
|
+
|
5
|
+
VALUE RBS;
|
6
|
+
VALUE RBS_AST;
|
7
|
+
VALUE RBS_AST_Comment;
|
8
|
+
VALUE RBS_AST_Annotation;
|
9
|
+
|
10
|
+
VALUE RBS_AST_Declarations;
|
11
|
+
|
12
|
+
VALUE RBS_AST_Declarations_ModuleTypeParams;
|
13
|
+
VALUE RBS_AST_Declarations_ModuleTypeParams_TypeParam;
|
14
|
+
|
15
|
+
VALUE RBS_AST_Declarations_Alias;
|
16
|
+
VALUE RBS_AST_Declarations_Constant;
|
17
|
+
VALUE RBS_AST_Declarations_Global;
|
18
|
+
VALUE RBS_AST_Declarations_Interface;
|
19
|
+
VALUE RBS_AST_Declarations_Module;
|
20
|
+
VALUE RBS_AST_Declarations_Module_Self;
|
21
|
+
VALUE RBS_AST_Declarations_Class;
|
22
|
+
VALUE RBS_AST_Declarations_Class_Super;
|
23
|
+
|
24
|
+
VALUE RBS_AST_Members;
|
25
|
+
VALUE RBS_AST_Members_Alias;
|
26
|
+
VALUE RBS_AST_Members_AttrAccessor;
|
27
|
+
VALUE RBS_AST_Members_AttrReader;
|
28
|
+
VALUE RBS_AST_Members_AttrWriter;
|
29
|
+
VALUE RBS_AST_Members_ClassInstanceVariable;
|
30
|
+
VALUE RBS_AST_Members_ClassVariable;
|
31
|
+
VALUE RBS_AST_Members_Extend;
|
32
|
+
VALUE RBS_AST_Members_Include;
|
33
|
+
VALUE RBS_AST_Members_InstanceVariable;
|
34
|
+
VALUE RBS_AST_Members_MethodDefinition;
|
35
|
+
VALUE RBS_AST_Members_Prepend;
|
36
|
+
VALUE RBS_AST_Members_Private;
|
37
|
+
VALUE RBS_AST_Members_Public;
|
38
|
+
|
39
|
+
VALUE RBS_Namespace;
|
40
|
+
VALUE RBS_TypeName;
|
41
|
+
|
42
|
+
VALUE RBS_Types_Alias;
|
43
|
+
VALUE RBS_Types_Bases_Any;
|
44
|
+
VALUE RBS_Types_Bases_Bool;
|
45
|
+
VALUE RBS_Types_Bases_Bottom;
|
46
|
+
VALUE RBS_Types_Bases_Class;
|
47
|
+
VALUE RBS_Types_Bases_Instance;
|
48
|
+
VALUE RBS_Types_Bases_Nil;
|
49
|
+
VALUE RBS_Types_Bases_Self;
|
50
|
+
VALUE RBS_Types_Bases_Top;
|
51
|
+
VALUE RBS_Types_Bases_Void;
|
52
|
+
VALUE RBS_Types_Bases;
|
53
|
+
VALUE RBS_Types_Block;
|
54
|
+
VALUE RBS_Types_ClassInstance;
|
55
|
+
VALUE RBS_Types_ClassSingleton;
|
56
|
+
VALUE RBS_Types_Function_Param;
|
57
|
+
VALUE RBS_Types_Function;
|
58
|
+
VALUE RBS_Types_Interface;
|
59
|
+
VALUE RBS_Types_Intersection;
|
60
|
+
VALUE RBS_Types_Literal;
|
61
|
+
VALUE RBS_Types_Optional;
|
62
|
+
VALUE RBS_Types_Proc;
|
63
|
+
VALUE RBS_Types_Record;
|
64
|
+
VALUE RBS_Types_Tuple;
|
65
|
+
VALUE RBS_Types_Union;
|
66
|
+
VALUE RBS_Types_Variable;
|
67
|
+
VALUE RBS_Types;
|
68
|
+
VALUE RBS_MethodType;
|
69
|
+
|
70
|
+
VALUE RBS_ParsingError;
|
71
|
+
|
72
|
+
void rbs__init_constants() {
|
73
|
+
ID id_RBS = rb_intern_const("RBS");
|
74
|
+
|
75
|
+
RBS = rb_const_get(rb_cObject, id_RBS);
|
76
|
+
RBS_ParsingError = rb_const_get(RBS, rb_intern("ParsingError"));
|
77
|
+
RBS_AST = rb_const_get(RBS, rb_intern("AST"));
|
78
|
+
RBS_AST_Comment = rb_const_get(RBS_AST, rb_intern("Comment"));
|
79
|
+
RBS_AST_Annotation = rb_const_get(RBS_AST, rb_intern("Annotation"));
|
80
|
+
|
81
|
+
RBS_AST_Declarations = rb_const_get(RBS_AST, rb_intern("Declarations"));
|
82
|
+
|
83
|
+
RBS_AST_Declarations_ModuleTypeParams = rb_const_get(RBS_AST_Declarations, rb_intern("ModuleTypeParams"));
|
84
|
+
RBS_AST_Declarations_ModuleTypeParams_TypeParam = rb_const_get(RBS_AST_Declarations_ModuleTypeParams, rb_intern("TypeParam"));
|
85
|
+
|
86
|
+
RBS_AST_Declarations_Alias = rb_const_get(RBS_AST_Declarations, rb_intern("Alias"));
|
87
|
+
RBS_AST_Declarations_Constant = rb_const_get(RBS_AST_Declarations, rb_intern("Constant"));
|
88
|
+
RBS_AST_Declarations_Global = rb_const_get(RBS_AST_Declarations, rb_intern("Global"));
|
89
|
+
RBS_AST_Declarations_Interface = rb_const_get(RBS_AST_Declarations, rb_intern("Interface"));
|
90
|
+
RBS_AST_Declarations_Module = rb_const_get(RBS_AST_Declarations, rb_intern("Module"));
|
91
|
+
RBS_AST_Declarations_Module_Self = rb_const_get(RBS_AST_Declarations_Module, rb_intern("Self"));
|
92
|
+
RBS_AST_Declarations_Class = rb_const_get(RBS_AST_Declarations, rb_intern("Class"));
|
93
|
+
RBS_AST_Declarations_Class_Super = rb_const_get(RBS_AST_Declarations_Class, rb_intern("Super"));
|
94
|
+
|
95
|
+
RBS_AST_Members = rb_const_get(RBS_AST, rb_intern("Members"));
|
96
|
+
RBS_AST_Members_Alias = rb_const_get(RBS_AST_Members, rb_intern("Alias"));
|
97
|
+
RBS_AST_Members_AttrAccessor = rb_const_get(RBS_AST_Members, rb_intern("AttrAccessor"));
|
98
|
+
RBS_AST_Members_AttrReader = rb_const_get(RBS_AST_Members, rb_intern("AttrReader"));
|
99
|
+
RBS_AST_Members_AttrWriter = rb_const_get(RBS_AST_Members, rb_intern("AttrWriter"));
|
100
|
+
RBS_AST_Members_ClassInstanceVariable = rb_const_get(RBS_AST_Members, rb_intern("ClassInstanceVariable"));
|
101
|
+
RBS_AST_Members_ClassVariable = rb_const_get(RBS_AST_Members, rb_intern("ClassVariable"));
|
102
|
+
RBS_AST_Members_Extend = rb_const_get(RBS_AST_Members, rb_intern("Extend"));
|
103
|
+
RBS_AST_Members_Include = rb_const_get(RBS_AST_Members, rb_intern("Include"));
|
104
|
+
RBS_AST_Members_InstanceVariable = rb_const_get(RBS_AST_Members, rb_intern("InstanceVariable"));
|
105
|
+
RBS_AST_Members_MethodDefinition = rb_const_get(RBS_AST_Members, rb_intern("MethodDefinition"));
|
106
|
+
RBS_AST_Members_Prepend = rb_const_get(RBS_AST_Members, rb_intern("Prepend"));
|
107
|
+
RBS_AST_Members_Private = rb_const_get(RBS_AST_Members, rb_intern("Private"));
|
108
|
+
RBS_AST_Members_Public = rb_const_get(RBS_AST_Members, rb_intern("Public"));
|
109
|
+
|
110
|
+
RBS_Namespace = rb_const_get(RBS, rb_intern("Namespace"));
|
111
|
+
RBS_TypeName = rb_const_get(RBS, rb_intern("TypeName"));
|
112
|
+
RBS_Types = rb_const_get(RBS, rb_intern("Types"));
|
113
|
+
RBS_Types_Alias = rb_const_get(RBS_Types, rb_intern("Alias"));
|
114
|
+
RBS_Types_Bases = rb_const_get(RBS_Types, rb_intern("Bases"));
|
115
|
+
RBS_Types_Bases_Any = rb_const_get(RBS_Types_Bases, rb_intern("Any"));
|
116
|
+
RBS_Types_Bases_Bool = rb_const_get(RBS_Types_Bases, rb_intern("Bool"));
|
117
|
+
RBS_Types_Bases_Bottom = rb_const_get(RBS_Types_Bases, rb_intern("Bottom"));
|
118
|
+
RBS_Types_Bases_Class = rb_const_get(RBS_Types_Bases, rb_intern("Class"));
|
119
|
+
RBS_Types_Bases_Instance = rb_const_get(RBS_Types_Bases, rb_intern("Instance"));
|
120
|
+
RBS_Types_Bases_Nil = rb_const_get(RBS_Types_Bases, rb_intern("Nil"));
|
121
|
+
RBS_Types_Bases_Self = rb_const_get(RBS_Types_Bases, rb_intern("Self"));
|
122
|
+
RBS_Types_Bases_Top = rb_const_get(RBS_Types_Bases, rb_intern("Top"));
|
123
|
+
RBS_Types_Bases_Void = rb_const_get(RBS_Types_Bases, rb_intern("Void"));
|
124
|
+
RBS_Types_Block = rb_const_get(RBS_Types, rb_intern("Block"));
|
125
|
+
RBS_Types_ClassInstance = rb_const_get(RBS_Types, rb_intern("ClassInstance"));
|
126
|
+
RBS_Types_ClassSingleton = rb_const_get(RBS_Types, rb_intern("ClassSingleton"));
|
127
|
+
RBS_Types_Function = rb_const_get(RBS_Types, rb_intern("Function"));
|
128
|
+
RBS_Types_Function_Param = rb_const_get(RBS_Types_Function, rb_intern("Param"));
|
129
|
+
RBS_Types_Interface = rb_const_get(RBS_Types, rb_intern("Interface"));
|
130
|
+
RBS_Types_Intersection = rb_const_get(RBS_Types, rb_intern("Intersection"));
|
131
|
+
RBS_Types_Literal = rb_const_get(RBS_Types, rb_intern("Literal"));
|
132
|
+
RBS_Types_Optional = rb_const_get(RBS_Types, rb_intern("Optional"));
|
133
|
+
RBS_Types_Proc = rb_const_get(RBS_Types, rb_intern("Proc"));
|
134
|
+
RBS_Types_Record = rb_const_get(RBS_Types, rb_intern("Record"));
|
135
|
+
RBS_Types_Tuple = rb_const_get(RBS_Types, rb_intern("Tuple"));
|
136
|
+
RBS_Types_Union = rb_const_get(RBS_Types, rb_intern("Union"));
|
137
|
+
RBS_Types_Variable = rb_const_get(RBS_Types, rb_intern("Variable"));
|
138
|
+
RBS_MethodType = rb_const_get(RBS, rb_intern("MethodType"));
|
139
|
+
}
|
@@ -0,0 +1,72 @@
|
|
1
|
+
#ifndef RBS__CONSTANTS_H
|
2
|
+
#define RBS__CONSTANTS_H
|
3
|
+
|
4
|
+
extern VALUE RBS;
|
5
|
+
|
6
|
+
extern VALUE RBS_AST;
|
7
|
+
extern VALUE RBS_AST_Annotation;
|
8
|
+
extern VALUE RBS_AST_Comment;
|
9
|
+
|
10
|
+
extern VALUE RBS_AST_Declarations;
|
11
|
+
extern VALUE RBS_AST_Declarations_Alias;
|
12
|
+
extern VALUE RBS_AST_Declarations_Class_Super;
|
13
|
+
extern VALUE RBS_AST_Declarations_Class;
|
14
|
+
extern VALUE RBS_AST_Declarations_Constant;
|
15
|
+
extern VALUE RBS_AST_Declarations_Global;
|
16
|
+
extern VALUE RBS_AST_Declarations_Interface;
|
17
|
+
extern VALUE RBS_AST_Declarations_Module_Self;
|
18
|
+
extern VALUE RBS_AST_Declarations_Module;
|
19
|
+
extern VALUE RBS_AST_Declarations_ModuleTypeParams_TypeParam;
|
20
|
+
extern VALUE RBS_AST_Declarations_ModuleTypeParams;
|
21
|
+
|
22
|
+
extern VALUE RBS_AST_Members;
|
23
|
+
extern VALUE RBS_AST_Members_Alias;
|
24
|
+
extern VALUE RBS_AST_Members_AttrAccessor;
|
25
|
+
extern VALUE RBS_AST_Members_AttrReader;
|
26
|
+
extern VALUE RBS_AST_Members_AttrWriter;
|
27
|
+
extern VALUE RBS_AST_Members_ClassInstanceVariable;
|
28
|
+
extern VALUE RBS_AST_Members_ClassVariable;
|
29
|
+
extern VALUE RBS_AST_Members_Extend;
|
30
|
+
extern VALUE RBS_AST_Members_Include;
|
31
|
+
extern VALUE RBS_AST_Members_InstanceVariable;
|
32
|
+
extern VALUE RBS_AST_Members_MethodDefinition;
|
33
|
+
extern VALUE RBS_AST_Members_Prepend;
|
34
|
+
extern VALUE RBS_AST_Members_Private;
|
35
|
+
extern VALUE RBS_AST_Members_Public;
|
36
|
+
|
37
|
+
extern VALUE RBS_MethodType;
|
38
|
+
extern VALUE RBS_Namespace;
|
39
|
+
|
40
|
+
extern VALUE RBS_ParsingError;
|
41
|
+
extern VALUE RBS_TypeName;
|
42
|
+
|
43
|
+
extern VALUE RBS_Types;
|
44
|
+
extern VALUE RBS_Types_Alias;
|
45
|
+
extern VALUE RBS_Types_Bases;
|
46
|
+
extern VALUE RBS_Types_Bases_Any;
|
47
|
+
extern VALUE RBS_Types_Bases_Bool;
|
48
|
+
extern VALUE RBS_Types_Bases_Bottom;
|
49
|
+
extern VALUE RBS_Types_Bases_Class;
|
50
|
+
extern VALUE RBS_Types_Bases_Instance;
|
51
|
+
extern VALUE RBS_Types_Bases_Nil;
|
52
|
+
extern VALUE RBS_Types_Bases_Self;
|
53
|
+
extern VALUE RBS_Types_Bases_Top;
|
54
|
+
extern VALUE RBS_Types_Bases_Void;
|
55
|
+
extern VALUE RBS_Types_Block;
|
56
|
+
extern VALUE RBS_Types_ClassInstance;
|
57
|
+
extern VALUE RBS_Types_ClassSingleton;
|
58
|
+
extern VALUE RBS_Types_Function_Param;
|
59
|
+
extern VALUE RBS_Types_Function;
|
60
|
+
extern VALUE RBS_Types_Interface;
|
61
|
+
extern VALUE RBS_Types_Intersection;
|
62
|
+
extern VALUE RBS_Types_Literal;
|
63
|
+
extern VALUE RBS_Types_Optional;
|
64
|
+
extern VALUE RBS_Types_Proc;
|
65
|
+
extern VALUE RBS_Types_Record;
|
66
|
+
extern VALUE RBS_Types_Tuple;
|
67
|
+
extern VALUE RBS_Types_Union;
|
68
|
+
extern VALUE RBS_Types_Variable;
|
69
|
+
|
70
|
+
void rbs__init_constants();
|
71
|
+
|
72
|
+
#endif
|