Skip to content

Commit 98d1a87

Browse files
committed
Formatting
1 parent 9b5f02c commit 98d1a87

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

lib/syntax_tree/dsl.rb

+6-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ def AliasNode(left, right)
3838

3939
# Create a new AndNode node.
4040
def AndNode(left, operator, right)
41-
AndNode.new(left: left, operator: operator, right: right, location: Location.default)
41+
AndNode.new(
42+
left: left,
43+
operator: operator,
44+
right: right,
45+
location: Location.default
46+
)
4247
end
4348

4449
# Create a new ARef node.

lib/syntax_tree/node.rb

+9-2
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,13 @@ def child_nodes
595595
end
596596

597597
def copy(left: nil, operator: nil, right: nil, location: nil)
598-
node = AndNode.new(left: left || self.left, operator: operator || self.operator, right: right || self.right, location: location || self.location)
598+
node =
599+
AndNode.new(
600+
left: left || self.left,
601+
operator: operator || self.operator,
602+
right: right || self.right,
603+
location: location || self.location
604+
)
599605
node.comments.concat(comments.map(&:copy))
600606
node
601607
end
@@ -630,7 +636,8 @@ def format(q)
630636
end
631637

632638
def ===(other)
633-
other.is_a?(AndNode) && left === other.left && operator === other.operator && right === other.right
639+
other.is_a?(AndNode) && left === other.left &&
640+
operator === other.operator && right === other.right
634641
end
635642
end
636643

0 commit comments

Comments
 (0)