@@ -49,10 +49,8 @@ def initialize(start_line:, start_char:, end_line:, end_char:)
4949 end
5050
5151 def ==( other )
52- other . is_a? ( Location ) &&
53- start_line == other . start_line &&
54- start_char == other . start_char &&
55- end_line == other . end_line &&
52+ other . is_a? ( Location ) && start_line == other . start_line &&
53+ start_char == other . start_char && end_line == other . end_line &&
5654 end_char == other . end_char
5755 end
5856
@@ -1532,9 +1530,7 @@ def on_binary(left, operator, right)
15321530 # `operator` object would be `:<`. However, on JRuby, it's an `@op` node,
15331531 # so here we're going to explicitly convert it into the same normalized
15341532 # form.
1535- unless operator . is_a? ( Symbol )
1536- operator = tokens . delete ( operator ) . value
1537- end
1533+ operator = tokens . delete ( operator ) . value unless operator . is_a? ( Symbol )
15381534
15391535 Binary . new (
15401536 left : left ,
@@ -2067,9 +2063,7 @@ def on_case(value, consequent)
20672063 location : keyword . location . to ( consequent . location )
20682064 )
20692065 else
2070- operator =
2071- find_token ( Kw , 'in' , consume : false ) ||
2072- find_token ( Op , '=>' )
2066+ operator = find_token ( Kw , 'in' , consume : false ) || find_token ( Op , '=>' )
20732067
20742068 RAssign . new (
20752069 value : value ,
@@ -7254,8 +7248,7 @@ def to_json(*opts)
72547248 def attach_comments ( start_char , end_char )
72557249 attachable =
72567250 parser . comments . select do |comment |
7257- !comment . inline? &&
7258- start_char <= comment . location . start_char &&
7251+ !comment . inline? && start_char <= comment . location . start_char &&
72597252 end_char >= comment . location . end_char &&
72607253 !comment . value . include? ( 'prettier-ignore' )
72617254 end
0 commit comments