We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57f5a98 commit 15514e5Copy full SHA for 15514e5
lib/syntax_tree/language_server/inlay_hints.rb
@@ -69,11 +69,10 @@ def visit_assign(node)
69
#
70
def visit_binary(node)
71
case stack[-2]
72
- in Assign | OpAssign
+ when Assign, OpAssign
73
parentheses(node.location)
74
- in Binary[operator: operator] if operator != node.operator
75
- parentheses(node.location)
76
- else
+ when Binary
+ parentheses(node.location) if stack[-2].operator != node.operator
77
end
78
79
super
@@ -91,9 +90,8 @@ def visit_binary(node)
91
90
92
def visit_if_op(node)
93
94
- in Assign | Binary | IfOp | OpAssign
+ when Assign, Binary, IfOp, OpAssign
95
96
97
98
99
0 commit comments