Skip to content

Commit e199dd1

Browse files
committed
Formatting
1 parent 8e19449 commit e199dd1

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
@@ -581,7 +581,13 @@ def child_nodes
581581
end
582582

583583
def copy(left: nil, operator: nil, right: nil, location: nil)
584-
node = AndNode.new(left: left || self.left, operator: operator || self.operator, right: right || self.right, location: location || self.location)
584+
node =
585+
AndNode.new(
586+
left: left || self.left,
587+
operator: operator || self.operator,
588+
right: right || self.right,
589+
location: location || self.location
590+
)
585591
node.comments.concat(comments.map(&:copy))
586592
node
587593
end
@@ -616,7 +622,8 @@ def format(q)
616622
end
617623

618624
def ===(other)
619-
other.is_a?(AndNode) && left === other.left && operator === other.operator && right === other.right
625+
other.is_a?(AndNode) && left === other.left &&
626+
operator === other.operator && right === other.right
620627
end
621628
end
622629

0 commit comments

Comments
 (0)