Skip to content

Commit 410e7e3

Browse files
committed
Format everything
1 parent 29af9b7 commit 410e7e3

File tree

4 files changed

+152
-62
lines changed

4 files changed

+152
-62
lines changed

Gemfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# frozen_string_literal: true
22

3-
source 'https://rubygems.org'
3+
source "https://rubygems.org"
44

55
gemspec
66

7-
gem 'benchmark-ips'
8-
gem 'parser'
9-
gem 'ruby_parser'
10-
gem 'stackprof'
7+
gem "benchmark-ips"
8+
gem "parser"
9+
gem "ruby_parser"
10+
gem "stackprof"

lib/syntax_tree.rb

Lines changed: 53 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,12 @@ def format(q)
15381538
attr_reader :comments
15391539

15401540
def initialize(
1541-
constant:, requireds:, rest:, posts:, location:, comments: []
1541+
constant:,
1542+
requireds:,
1543+
rest:,
1544+
posts:,
1545+
location:,
1546+
comments: []
15421547
)
15431548
@constant = constant
15441549
@requireds = requireds
@@ -3489,7 +3494,12 @@ class CommandCall
34893494
attr_reader :comments
34903495

34913496
def initialize(
3492-
receiver:, operator:, message:, arguments:, location:, comments: []
3497+
receiver:,
3498+
operator:,
3499+
message:,
3500+
arguments:,
3501+
location:,
3502+
comments: []
34933503
)
34943504
@receiver = receiver
34953505
@operator = operator
@@ -4333,7 +4343,13 @@ class Defs
43334343
attr_reader :comments
43344344

43354345
def initialize(
4336-
target:, operator:, name:, params:, bodystmt:, location:, comments: []
4346+
target:,
4347+
operator:,
4348+
name:,
4349+
params:,
4350+
bodystmt:,
4351+
location:,
4352+
comments: []
43374353
)
43384354
@target = target
43394355
@operator = operator
@@ -5025,7 +5041,11 @@ class Elsif
50255041
attr_reader :comments
50265042

50275043
def initialize(
5028-
predicate:, statements:, consequent:, location:, comments: []
5044+
predicate:,
5045+
statements:,
5046+
consequent:,
5047+
location:,
5048+
comments: []
50295049
)
50305050
@predicate = predicate
50315051
@statements = statements
@@ -6479,7 +6499,11 @@ class If
64796499
attr_reader :comments
64806500

64816501
def initialize(
6482-
predicate:, statements:, consequent:, location:, comments: []
6502+
predicate:,
6503+
statements:,
6504+
consequent:,
6505+
location:,
6506+
comments: []
64836507
)
64846508
@predicate = predicate
64856509
@statements = statements
@@ -8547,10 +8571,8 @@ def format(q)
85478571
parts << KeywordRestFormatter.new(keyword_rest) if keyword_rest
85488572
parts << block if block
85498573

8550-
q.group do
8551-
q.seplist(parts) { |part| q.format(part) }
8552-
q.format(rest) if rest && rest.is_a?(ExcessedComma)
8553-
end
8574+
q.seplist(parts) { |part| q.format(part) }
8575+
q.format(rest) if rest && rest.is_a?(ExcessedComma)
85548576
end
85558577

85568578
def pretty_print(q)
@@ -8644,7 +8666,13 @@ def to_json(*opts)
86448666
# (nil | BlockArg) block
86458667
# ) -> Params
86468668
def on_params(
8647-
requireds, optionals, rest, posts, keywords, keyword_rest, block
8669+
requireds,
8670+
optionals,
8671+
rest,
8672+
posts,
8673+
keywords,
8674+
keyword_rest,
8675+
block
86488676
)
86498677
parts =
86508678
[
@@ -9692,7 +9720,11 @@ class Rescue
96929720
attr_reader :comments
96939721

96949722
def initialize(
9695-
exception:, statements:, consequent:, location:, comments: []
9723+
exception:,
9724+
statements:,
9725+
consequent:,
9726+
location:,
9727+
comments: []
96969728
)
96979729
@exception = exception
96989730
@statements = statements
@@ -11721,7 +11753,11 @@ class Unless
1172111753
attr_reader :comments
1172211754

1172311755
def initialize(
11724-
predicate:, statements:, consequent:, location:, comments: []
11756+
predicate:,
11757+
statements:,
11758+
consequent:,
11759+
location:,
11760+
comments: []
1172511761
)
1172611762
@predicate = predicate
1172711763
@statements = statements
@@ -12426,7 +12462,11 @@ class When
1242612462
attr_reader :comments
1242712463

1242812464
def initialize(
12429-
arguments:, statements:, consequent:, location:, comments: []
12465+
arguments:,
12466+
statements:,
12467+
consequent:,
12468+
location:,
12469+
comments: []
1243012470
)
1243112471
@arguments = arguments
1243212472
@statements = statements

0 commit comments

Comments
 (0)