sorbet-progress 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.rubocop.yml +4 -0
- data/.travis.yml +8 -4
- data/CHANGELOG.md +18 -0
- data/bin/test.sh +30 -4
- data/lib/sorbet_progress/calculator.rb +18 -13
- data/lib/sorbet_progress/cli.rb +8 -1
- data/lib/sorbet_progress/metrics.rb +1 -1
- data/lib/sorbet_progress/parser.rb +1 -1
- data/lib/sorbet_progress/version.rb +1 -1
- data/sorbet-progress.gemspec +2 -2
- data/sorbet/config +1 -0
- data/sorbet/rbi/gems/jaro_winkler.rbi +1 -1
- data/sorbet/rbi/gems/minitest.rbi +11 -1
- data/sorbet/rbi/gems/parallel.rbi +1 -1
- data/sorbet/rbi/gems/parser.rbi +88 -3
- data/sorbet/rbi/gems/rubocop.rbi +21 -1
- data/sorbet/rbi/hidden-definitions/hidden.rbi +1994 -8477
- data/sorbet/rbi/sorbet-typed/lib/bundler/all/bundler.rbi +2779 -2642
- data/sorbet/rbi/sorbet-typed/lib/minitest/all/minitest.rbi +102 -0
- data/sorbet/rbi/sorbet-typed/lib/rainbow/all/rainbow.rbi +254 -0
- data/sorbet/rbi/sorbet-typed/lib/ruby/all/gem.rbi +4222 -0
- data/sorbet/rbi/sorbet-typed/lib/ruby/all/open3.rbi +22 -22
- data/sorbet/rbi/sorbet-typed/lib/ruby/all/resolv.rbi +1 -1
- data/sorbet/rbi/todo.rbi +18 -0
- metadata +8 -18
- data/sorbet/rbi/gems/sorbet-runtime.rbi +0 -646
- data/sorbet/rbi/hidden-definitions/errors.txt +0 -6300
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2b826258c3712e1cff93a6c4d1bb5320e2c5055a50fa043f891fa671229d5a9
|
4
|
+
data.tar.gz: fab043fa62f98888b302998ac6fe4edc128b7614e40c1c6053dc1de911a2d321
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b90be69cf7bcf938efdd2047084b184641f1d536b94698226942773373e2d364fa2d46823d6cdfa90c68eae37582551af5dc0dc851257c76768e3d895f01919
|
7
|
+
data.tar.gz: f82accf24f92a0fbaecb343305db8699ca080fc02bb711fad1b4f2deb7ccb988fb9b93ecbbbf34bf73eef53512fdaafb24ffcc2998767572a71d93eda763a7a9
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
language: ruby
|
2
|
+
before_install: gem install bundler -v 2.1.3
|
4
3
|
cache: bundler
|
4
|
+
env:
|
5
|
+
- TRAVIS=true
|
6
|
+
language: ruby
|
5
7
|
rvm:
|
6
|
-
- 2.
|
7
|
-
|
8
|
+
- 2.6.5
|
9
|
+
- 2.7.0
|
10
|
+
script: bin/test.sh
|
11
|
+
sudo: false
|
data/CHANGELOG.md
CHANGED
@@ -12,6 +12,24 @@ recommendations of [keepachangelog.com](http://keepachangelog.com/).
|
|
12
12
|
- Fixed
|
13
13
|
- None
|
14
14
|
|
15
|
+
## 0.2.5 (2020-01-03)
|
16
|
+
|
17
|
+
- Breaking Changes
|
18
|
+
- None
|
19
|
+
- Added
|
20
|
+
- Support for sorbet 0.5
|
21
|
+
- Fixed
|
22
|
+
- None
|
23
|
+
|
24
|
+
## 0.2.4 (2019-10-11)
|
25
|
+
|
26
|
+
- Breaking Changes
|
27
|
+
- None
|
28
|
+
- Added
|
29
|
+
- [#1](https://github.com/jaredbeck/sorbet-progress/pull/1) - sigil percentages
|
30
|
+
- Fixed
|
31
|
+
- None
|
32
|
+
|
15
33
|
## 0.2.3 (2019-07-08)
|
16
34
|
|
17
35
|
- Breaking Changes
|
data/bin/test.sh
CHANGED
@@ -1,9 +1,35 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
3
|
set -e
|
4
|
+
|
4
5
|
bundle exec srb tc --metrics-file /tmp/sorbet_metrics.json
|
5
|
-
|
6
|
-
|
7
|
-
|
6
|
+
|
7
|
+
# TODO: Doesn't work on travis. No idea why.
|
8
|
+
#
|
9
|
+
# ```
|
10
|
+
# Traceback (most recent call last):
|
11
|
+
# 4: from /home/travis/.rvm/rubies/ruby-2.6.5/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
|
12
|
+
# 3: from /home/travis/.rvm/rubies/ruby-2.6.5/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
|
13
|
+
# 2: from /home/travis/build/jaredbeck/sorbet-progress/lib/sorbet_progress.rb:4:in `<top (required)>'
|
14
|
+
# 1: from /home/travis/.rvm/rubies/ruby-2.6.5/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
|
15
|
+
# /home/travis/.rvm/rubies/ruby-2.6.5/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- sorbet-runtime
|
16
|
+
# ```
|
17
|
+
if [ "$TRAVIS" != 'true' ]; then
|
18
|
+
bundle exec ruby -I lib \
|
19
|
+
-r sorbet_progress \
|
20
|
+
-e 'SorbetProgress::CLI.new(["/tmp/sorbet_metrics.json"]).run'
|
21
|
+
fi
|
22
|
+
|
8
23
|
bundle exec rubocop
|
9
|
-
|
24
|
+
|
25
|
+
# TODO: This `bundle exec ruby` also doesn't work on travis.
|
26
|
+
#
|
27
|
+
# ```
|
28
|
+
# home/travis/.rvm/gems/ruby-2.6.5/gems/bundler-2.1.3/lib/bundler/runtime.rb:312:in
|
29
|
+
# `check_for_activated_spec!': You have already activated minitest 5.11.3, but
|
30
|
+
# your Gemfile requires minitest 5.13.0. Prepending `bundle exec` to your
|
31
|
+
# command may solve this. (Gem::LoadError)
|
32
|
+
# ```
|
33
|
+
if [ "$TRAVIS" != 'true' ]; then
|
34
|
+
bundle exec ruby -I lib:test -r 'minitest/autorun' test/all.rb
|
35
|
+
fi
|
@@ -17,9 +17,9 @@ module SorbetProgress
|
|
17
17
|
@sigil_percentages = values.map do |label, value|
|
18
18
|
percentage = value * 1.0 / @total if @total && value
|
19
19
|
{
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
label: label,
|
21
|
+
value: value,
|
22
|
+
percentage: percentage
|
23
23
|
}
|
24
24
|
end
|
25
25
|
|
@@ -32,9 +32,9 @@ module SorbetProgress
|
|
32
32
|
sig { returns(T::Hash[Symbol, String]) }
|
33
33
|
def coverage_stats
|
34
34
|
{
|
35
|
-
|
36
|
-
|
37
|
-
|
35
|
+
total_signatures: "ruby_typer.unknown..types.sig.count",
|
36
|
+
total_methods: "ruby_typer.unknown..types.input.methods.total",
|
37
|
+
total_classes: "ruby_typer.unknown..types.input.classes.total"
|
38
38
|
}
|
39
39
|
end
|
40
40
|
|
@@ -42,17 +42,22 @@ module SorbetProgress
|
|
42
42
|
sig { returns(T::Hash[Symbol, String]) }
|
43
43
|
def sigil_breakdown_stats
|
44
44
|
{
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
45
|
+
total_files: "ruby_typer.unknown..types.input.files",
|
46
|
+
sigil_ignore: "ruby_typer.unknown..types.input.files.sigil.ignore",
|
47
|
+
sigil_false: "ruby_typer.unknown..types.input.files.sigil.false",
|
48
|
+
sigil_true: "ruby_typer.unknown..types.input.files.sigil.true",
|
49
|
+
sigil_strict: "ruby_typer.unknown..types.input.files.sigil.strict",
|
50
|
+
sigil_strong: "ruby_typer.unknown..types.input.files.sigil.strong"
|
51
51
|
}
|
52
52
|
end
|
53
53
|
|
54
54
|
# Extract the requested metric values.
|
55
|
-
sig {
|
55
|
+
sig {
|
56
|
+
params(
|
57
|
+
requested_stats: T::Hash[Symbol, String],
|
58
|
+
metrics: Metrics
|
59
|
+
).returns(T::Hash[Symbol, T.nilable(Integer)])
|
60
|
+
}
|
56
61
|
def collect_values(requested_stats, metrics)
|
57
62
|
result = {}
|
58
63
|
requested_stats.map do |label, name|
|
data/lib/sorbet_progress/cli.rb
CHANGED
@@ -25,6 +25,7 @@ module SorbetProgress
|
|
25
25
|
end
|
26
26
|
|
27
27
|
sig { void }
|
28
|
+
# rubocop:disable Metrics/AbcSize
|
28
29
|
def run
|
29
30
|
metrics = parse(@path)
|
30
31
|
puts "Sorbet Progress\n\n"
|
@@ -45,7 +46,12 @@ module SorbetProgress
|
|
45
46
|
else
|
46
47
|
0
|
47
48
|
end
|
48
|
-
puts format(
|
49
|
+
puts format(
|
50
|
+
"%-17s\t%d\t%.2f %%",
|
51
|
+
elem[:label],
|
52
|
+
elem[:value] || 0,
|
53
|
+
percentage
|
54
|
+
)
|
49
55
|
end
|
50
56
|
|
51
57
|
puts "---------------------------------------"
|
@@ -53,6 +59,7 @@ module SorbetProgress
|
|
53
59
|
|
54
60
|
puts "Keep up the good work 👍"
|
55
61
|
end
|
62
|
+
# rubocop:enable Metrics/AbcSize
|
56
63
|
|
57
64
|
private
|
58
65
|
|
data/sorbet-progress.gemspec
CHANGED
@@ -22,12 +22,12 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.required_rubygems_version = ">= 3.0.3"
|
23
23
|
|
24
24
|
lambda {
|
25
|
-
requirements =
|
25
|
+
requirements = ">= 0.4.4314"
|
26
26
|
spec.add_runtime_dependency "sorbet", requirements
|
27
27
|
spec.add_runtime_dependency "sorbet-runtime", requirements
|
28
28
|
}.call
|
29
29
|
|
30
|
-
spec.add_development_dependency "bundler", "~> 2.
|
30
|
+
spec.add_development_dependency "bundler", "~> 2.1"
|
31
31
|
spec.add_development_dependency "minitest", "~> 5.0"
|
32
32
|
spec.add_development_dependency "rubocop", "~> 0.72.0"
|
33
33
|
end
|
data/sorbet/config
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
#
|
8
8
|
# https://github.com/sorbet/sorbet-typed/new/master?filename=lib/minitest/all/minitest.rbi
|
9
9
|
#
|
10
|
-
# minitest-5.
|
10
|
+
# minitest-5.13.0
|
11
11
|
module Minitest
|
12
12
|
def self.__run(reporter, options); end
|
13
13
|
def self.after_run(&block); end
|
@@ -61,6 +61,7 @@ module Minitest::Assertions
|
|
61
61
|
def assert_nil(obj, msg = nil); end
|
62
62
|
def assert_operator(o1, op, o2 = nil, msg = nil); end
|
63
63
|
def assert_output(stdout = nil, stderr = nil); end
|
64
|
+
def assert_path_exists(path, msg = nil); end
|
64
65
|
def assert_predicate(o1, op, msg = nil); end
|
65
66
|
def assert_raises(*exp); end
|
66
67
|
def assert_respond_to(obj, meth, msg = nil); end
|
@@ -72,6 +73,7 @@ module Minitest::Assertions
|
|
72
73
|
def capture_subprocess_io; end
|
73
74
|
def diff(exp, act); end
|
74
75
|
def exception_details(e, msg); end
|
76
|
+
def fail_after(y, m, d, msg); end
|
75
77
|
def flunk(msg = nil); end
|
76
78
|
def message(msg = nil, ending = nil, &default); end
|
77
79
|
def mu_pp(obj); end
|
@@ -88,13 +90,16 @@ module Minitest::Assertions
|
|
88
90
|
def refute_match(matcher, obj, msg = nil); end
|
89
91
|
def refute_nil(obj, msg = nil); end
|
90
92
|
def refute_operator(o1, op, o2 = nil, msg = nil); end
|
93
|
+
def refute_path_exists(path, msg = nil); end
|
91
94
|
def refute_predicate(o1, op, msg = nil); end
|
92
95
|
def refute_respond_to(obj, meth, msg = nil); end
|
93
96
|
def refute_same(exp, act, msg = nil); end
|
94
97
|
def self.diff; end
|
95
98
|
def self.diff=(o); end
|
96
99
|
def skip(msg = nil, bt = nil); end
|
100
|
+
def skip_until(y, m, d, msg); end
|
97
101
|
def skipped?; end
|
102
|
+
def things_to_diff(exp, act); end
|
98
103
|
end
|
99
104
|
class Minitest::Unit
|
100
105
|
def self.after_tests(&b); end
|
@@ -269,6 +274,7 @@ module Minitest::Guard
|
|
269
274
|
def jruby?(platform = nil); end
|
270
275
|
def maglev?(platform = nil); end
|
271
276
|
def mri?(platform = nil); end
|
277
|
+
def osx?(platform = nil); end
|
272
278
|
def rubinius?(platform = nil); end
|
273
279
|
def windows?(platform = nil); end
|
274
280
|
end
|
@@ -318,6 +324,8 @@ module Minitest::Expectations
|
|
318
324
|
def must_raise(*args); end
|
319
325
|
def must_respond_to(*args); end
|
320
326
|
def must_throw(*args); end
|
327
|
+
def path_must_exist(*args); end
|
328
|
+
def path_wont_exist(*args); end
|
321
329
|
def wont_be(*args); end
|
322
330
|
def wont_be_close_to(*args); end
|
323
331
|
def wont_be_empty(*args); end
|
@@ -351,6 +359,8 @@ class Minitest::Expectation < Struct
|
|
351
359
|
def must_raise(*args); end
|
352
360
|
def must_respond_to(*args); end
|
353
361
|
def must_throw(*args); end
|
362
|
+
def path_must_exist(*args); end
|
363
|
+
def path_wont_exist(*args); end
|
354
364
|
def self.[](*arg0); end
|
355
365
|
def self.inspect; end
|
356
366
|
def self.members; end
|
data/sorbet/rbi/gems/parser.rbi
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
#
|
8
8
|
# https://github.com/sorbet/sorbet-typed/new/master?filename=lib/parser/all/parser.rbi
|
9
9
|
#
|
10
|
-
# parser-2.
|
10
|
+
# parser-2.7.0.1
|
11
11
|
module Parser
|
12
12
|
end
|
13
13
|
module Parser::Deprecation
|
@@ -30,6 +30,8 @@ class Parser::AST::Processor < AST::Processor
|
|
30
30
|
def on_args(node); end
|
31
31
|
def on_argument(node); end
|
32
32
|
def on_array(node); end
|
33
|
+
def on_array_pattern(node); end
|
34
|
+
def on_array_pattern_with_tail(node); end
|
33
35
|
def on_back_ref(node); end
|
34
36
|
def on_begin(node); end
|
35
37
|
def on_block(node); end
|
@@ -38,9 +40,11 @@ class Parser::AST::Processor < AST::Processor
|
|
38
40
|
def on_blockarg_expr(node); end
|
39
41
|
def on_break(node); end
|
40
42
|
def on_case(node); end
|
43
|
+
def on_case_match(node); end
|
41
44
|
def on_casgn(node); end
|
42
45
|
def on_class(node); end
|
43
46
|
def on_const(node); end
|
47
|
+
def on_const_pattern(node); end
|
44
48
|
def on_csend(node); end
|
45
49
|
def on_cvar(node); end
|
46
50
|
def on_cvasgn(node); end
|
@@ -56,8 +60,12 @@ class Parser::AST::Processor < AST::Processor
|
|
56
60
|
def on_gvar(node); end
|
57
61
|
def on_gvasgn(node); end
|
58
62
|
def on_hash(node); end
|
63
|
+
def on_hash_pattern(node); end
|
59
64
|
def on_if(node); end
|
65
|
+
def on_if_guard(node); end
|
60
66
|
def on_iflipflop(node); end
|
67
|
+
def on_in_match(node); end
|
68
|
+
def on_in_pattern(node); end
|
61
69
|
def on_index(node); end
|
62
70
|
def on_indexasgn(node); end
|
63
71
|
def on_irange(node); end
|
@@ -72,18 +80,24 @@ class Parser::AST::Processor < AST::Processor
|
|
72
80
|
def on_lvar(node); end
|
73
81
|
def on_lvasgn(node); end
|
74
82
|
def on_masgn(node); end
|
83
|
+
def on_match_alt(node); end
|
84
|
+
def on_match_as(node); end
|
75
85
|
def on_match_current_line(node); end
|
86
|
+
def on_match_rest(node); end
|
87
|
+
def on_match_var(node); end
|
76
88
|
def on_match_with_lvasgn(node); end
|
77
89
|
def on_mlhs(node); end
|
78
90
|
def on_module(node); end
|
79
91
|
def on_next(node); end
|
80
92
|
def on_not(node); end
|
81
93
|
def on_nth_ref(node); end
|
94
|
+
def on_numblock(node); end
|
82
95
|
def on_op_asgn(node); end
|
83
96
|
def on_optarg(node); end
|
84
97
|
def on_or(node); end
|
85
98
|
def on_or_asgn(node); end
|
86
99
|
def on_pair(node); end
|
100
|
+
def on_pin(node); end
|
87
101
|
def on_postexe(node); end
|
88
102
|
def on_preexe(node); end
|
89
103
|
def on_procarg0(node); end
|
@@ -101,6 +115,7 @@ class Parser::AST::Processor < AST::Processor
|
|
101
115
|
def on_splat(node); end
|
102
116
|
def on_super(node); end
|
103
117
|
def on_undef(node); end
|
118
|
+
def on_unless_guard(node); end
|
104
119
|
def on_until(node); end
|
105
120
|
def on_until_post(node); end
|
106
121
|
def on_var(node); end
|
@@ -435,7 +450,9 @@ class Parser::Diagnostic::Engine
|
|
435
450
|
end
|
436
451
|
class Parser::StaticEnvironment
|
437
452
|
def declare(name); end
|
453
|
+
def declare_forward_args; end
|
438
454
|
def declared?(name); end
|
455
|
+
def declared_forward_args?; end
|
439
456
|
def extend_dynamic; end
|
440
457
|
def extend_static; end
|
441
458
|
def initialize; end
|
@@ -444,9 +461,11 @@ class Parser::StaticEnvironment
|
|
444
461
|
end
|
445
462
|
class Parser::Lexer
|
446
463
|
def advance; end
|
447
|
-
def arg_or_cmdarg; end
|
464
|
+
def arg_or_cmdarg(cmd_state); end
|
448
465
|
def cmdarg; end
|
449
466
|
def cmdarg=(arg0); end
|
467
|
+
def command_start; end
|
468
|
+
def command_start=(arg0); end
|
450
469
|
def comments; end
|
451
470
|
def comments=(arg0); end
|
452
471
|
def cond; end
|
@@ -620,6 +639,7 @@ class Parser::Builders::Default
|
|
620
639
|
def arg_prefix_map(op_t, name_t = nil); end
|
621
640
|
def args(begin_t, args, end_t, check_args = nil); end
|
622
641
|
def array(begin_t, elements, end_t); end
|
642
|
+
def array_pattern(lbrack_t, elements, rbrack_t); end
|
623
643
|
def assign(lhs, eql_t, rhs); end
|
624
644
|
def assignable(node); end
|
625
645
|
def associate(begin_t, pairs, end_t); end
|
@@ -639,9 +659,15 @@ class Parser::Builders::Default
|
|
639
659
|
def call_method(receiver, dot_t, selector_t, lparen_t = nil, args = nil, rparen_t = nil); end
|
640
660
|
def call_type_for_dot(dot_t); end
|
641
661
|
def case(case_t, expr, when_bodies, else_t, else_body, end_t); end
|
662
|
+
def case_match(case_t, expr, in_bodies, else_t, else_body, end_t); end
|
642
663
|
def character(char_t); end
|
664
|
+
def check_assignment_to_numparam(node); end
|
643
665
|
def check_condition(cond); end
|
666
|
+
def check_duplicate_arg(this_arg, map = nil); end
|
644
667
|
def check_duplicate_args(args, map = nil); end
|
668
|
+
def check_duplicate_pattern_key(name, loc); end
|
669
|
+
def check_duplicate_pattern_variable(name, loc); end
|
670
|
+
def check_lvar_name(name, loc); end
|
645
671
|
def collapse_string_parts?(parts); end
|
646
672
|
def collection_map(begin_t, parts, end_t); end
|
647
673
|
def complex(complex_t); end
|
@@ -653,6 +679,7 @@ class Parser::Builders::Default
|
|
653
679
|
def const_fetch(scope, t_colon2, name_t); end
|
654
680
|
def const_global(t_colon3, name_t); end
|
655
681
|
def const_op_assignable(node); end
|
682
|
+
def const_pattern(const, ldelim_t, pattern, rdelim_t); end
|
656
683
|
def constant_map(scope, colon2_t, name_t); end
|
657
684
|
def cvar(token); end
|
658
685
|
def dedent_string(node, dedent_level); end
|
@@ -672,8 +699,15 @@ class Parser::Builders::Default
|
|
672
699
|
def float(float_t); end
|
673
700
|
def for(for_t, iterator, in_t, iteratee, do_t, body, end_t); end
|
674
701
|
def for_map(keyword_t, in_t, begin_t, end_t); end
|
702
|
+
def forward_args(begin_t, dots_t, end_t); end
|
703
|
+
def forwarded_args(dots_t); end
|
704
|
+
def guard_map(keyword_t, guard_body_e); end
|
675
705
|
def gvar(token); end
|
706
|
+
def hash_pattern(lbrace_t, kwargs, rbrace_t); end
|
676
707
|
def ident(token); end
|
708
|
+
def if_guard(if_t, if_body); end
|
709
|
+
def in_match(lhs, in_t, rhs); end
|
710
|
+
def in_pattern(in_t, pattern, guard, then_t, body); end
|
677
711
|
def index(receiver, lbrack_t, indexes, rbrack_t); end
|
678
712
|
def index_asgn(receiver, lbrack_t, indexes, rbrack_t); end
|
679
713
|
def index_map(receiver_e, lbrack_t, rbrack_t); end
|
@@ -686,6 +720,7 @@ class Parser::Builders::Default
|
|
686
720
|
def keyword_mod_map(pre_e, keyword_t, post_e); end
|
687
721
|
def kwarg(name_t); end
|
688
722
|
def kwarg_map(name_t, value_e = nil); end
|
723
|
+
def kwnilarg(dstar_t, nil_t); end
|
689
724
|
def kwoptarg(name_t, value); end
|
690
725
|
def kwrestarg(dstar_t, name_t = nil); end
|
691
726
|
def kwsplat(dstar_t, arg); end
|
@@ -693,8 +728,17 @@ class Parser::Builders::Default
|
|
693
728
|
def logical_op(type, lhs, op_t, rhs); end
|
694
729
|
def loop(type, keyword_t, cond, do_t, body, end_t); end
|
695
730
|
def loop_mod(type, body, keyword_t, cond); end
|
731
|
+
def match_alt(left, pipe_t, right); end
|
732
|
+
def match_as(value, assoc_t, as); end
|
733
|
+
def match_hash_var(name_t); end
|
734
|
+
def match_hash_var_from_str(begin_t, strings, end_t); end
|
735
|
+
def match_label(label_type, label); end
|
736
|
+
def match_nil_pattern(dstar_t, nil_t); end
|
696
737
|
def match_op(receiver, match_t, arg); end
|
697
|
-
def
|
738
|
+
def match_pair(label_type, label, value); end
|
739
|
+
def match_rest(star_t, name_t = nil); end
|
740
|
+
def match_var(name_t); end
|
741
|
+
def match_with_trailing_comma(match); end
|
698
742
|
def module_definition_map(keyword_t, name_e, operator_t, end_t); end
|
699
743
|
def multi_assign(lhs, eql_t, rhs); end
|
700
744
|
def multi_lhs(begin_t, items, end_t); end
|
@@ -703,6 +747,7 @@ class Parser::Builders::Default
|
|
703
747
|
def nil(nil_t); end
|
704
748
|
def not_op(not_t, begin_t = nil, receiver = nil, end_t = nil); end
|
705
749
|
def nth_ref(token); end
|
750
|
+
def numargs(max_numparam); end
|
706
751
|
def numeric(kind, token); end
|
707
752
|
def objc_kwarg(kwname_t, assoc_t, name_t); end
|
708
753
|
def objc_restarg(star_t, name = nil); end
|
@@ -717,6 +762,7 @@ class Parser::Builders::Default
|
|
717
762
|
def pair_quoted_map(begin_t, end_t, value_e); end
|
718
763
|
def parser; end
|
719
764
|
def parser=(arg0); end
|
765
|
+
def pin(pin_t, var); end
|
720
766
|
def postexe(postexe_t, lbrace_t, compstmt, rbrace_t); end
|
721
767
|
def preexe(preexe_t, lbrace_t, compstmt, rbrace_t); end
|
722
768
|
def prefix_string_map(symbol); end
|
@@ -733,6 +779,8 @@ class Parser::Builders::Default
|
|
733
779
|
def restarg(star_t, name_t = nil); end
|
734
780
|
def restarg_expr(star_t, expr = nil); end
|
735
781
|
def self(token); end
|
782
|
+
def self.emit_arg_inside_procarg0; end
|
783
|
+
def self.emit_arg_inside_procarg0=(arg0); end
|
736
784
|
def self.emit_encoding; end
|
737
785
|
def self.emit_encoding=(arg0); end
|
738
786
|
def self.emit_index; end
|
@@ -768,6 +816,7 @@ class Parser::Builders::Default
|
|
768
816
|
def unary_op(op_t, receiver); end
|
769
817
|
def unary_op_map(op_t, arg_e = nil); end
|
770
818
|
def undef_method(undef_t, names); end
|
819
|
+
def unless_guard(unless_t, unless_body); end
|
771
820
|
def unquoted_map(token); end
|
772
821
|
def value(token); end
|
773
822
|
def var_send_map(variable_e); end
|
@@ -780,7 +829,10 @@ end
|
|
780
829
|
class Parser::Context
|
781
830
|
def class_definition_allowed?; end
|
782
831
|
def dynamic_const_definition_allowed?; end
|
832
|
+
def in_block?; end
|
783
833
|
def in_class?; end
|
834
|
+
def in_dynamic_block?; end
|
835
|
+
def in_lambda?; end
|
784
836
|
def indirectly_in_def?; end
|
785
837
|
def initialize; end
|
786
838
|
def module_definition_allowed?; end
|
@@ -789,17 +841,50 @@ class Parser::Context
|
|
789
841
|
def reset; end
|
790
842
|
def stack; end
|
791
843
|
end
|
844
|
+
class Parser::MaxNumparamStack
|
845
|
+
def has_numparams?; end
|
846
|
+
def has_ordinary_params!; end
|
847
|
+
def has_ordinary_params?; end
|
848
|
+
def initialize; end
|
849
|
+
def pop; end
|
850
|
+
def push; end
|
851
|
+
def register(numparam); end
|
852
|
+
def set(value); end
|
853
|
+
def stack; end
|
854
|
+
def top; end
|
855
|
+
end
|
856
|
+
class Parser::CurrentArgStack
|
857
|
+
def initialize; end
|
858
|
+
def pop; end
|
859
|
+
def push(value); end
|
860
|
+
def reset; end
|
861
|
+
def set(value); end
|
862
|
+
def stack; end
|
863
|
+
def top; end
|
864
|
+
end
|
865
|
+
class Parser::VariablesStack
|
866
|
+
def declare(name); end
|
867
|
+
def declared?(name); end
|
868
|
+
def initialize; end
|
869
|
+
def pop; end
|
870
|
+
def push; end
|
871
|
+
def reset; end
|
872
|
+
end
|
792
873
|
class Parser::Base < Racc::Parser
|
793
874
|
def builder; end
|
794
875
|
def check_kwarg_name(name_t); end
|
795
876
|
def context; end
|
877
|
+
def current_arg_stack; end
|
796
878
|
def diagnostic(level, reason, arguments, location_t, highlights_ts = nil); end
|
797
879
|
def diagnostics; end
|
798
880
|
def initialize(builder = nil); end
|
881
|
+
def max_numparam_stack; end
|
799
882
|
def next_token; end
|
800
883
|
def on_error(error_token_id, error_value, value_stack); end
|
801
884
|
def parse(source_buffer); end
|
802
885
|
def parse_with_comments(source_buffer); end
|
886
|
+
def pattern_hash_keys; end
|
887
|
+
def pattern_variables; end
|
803
888
|
def reset; end
|
804
889
|
def self.default_parser; end
|
805
890
|
def self.parse(string, file = nil, line = nil); end
|