summaryrefslogtreecommitdiff
path: root/lib/prism/desugar_compiler.rb
diff options
context:
space:
mode:
authorKevin Newton <kddnewton@gmail.com>2024-05-10 10:19:11 -0400
committerKevin Newton <kddnewton@gmail.com>2024-05-10 11:47:48 -0400
commit2e4466454721012b3ba27f262b3e5dd6e3d393b0 (patch)
tree14b180a48ecd1cffe376dbf00990cc11a048cc3a /lib/prism/desugar_compiler.rb
parent34e0b5b2d419840f4e97cdf8fffcbc3578a5f7a3 (diff)
[ruby/prism] operator rename
https://github.com/ruby/prism/commit/b5e47f5c42
Diffstat (limited to 'lib/prism/desugar_compiler.rb')
-rw-r--r--lib/prism/desugar_compiler.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/prism/desugar_compiler.rb b/lib/prism/desugar_compiler.rb
index 9b62c00df3..de02445149 100644
--- a/lib/prism/desugar_compiler.rb
+++ b/lib/prism/desugar_compiler.rb
@@ -73,7 +73,7 @@ module Prism
# Desugar `x += y` to `x = x + y`
def compile
- operator_loc = node.operator_loc.chop
+ binary_operator_loc = node.binary_operator_loc.chop
write_class.new(
source,
@@ -84,15 +84,15 @@ module Prism
0,
read_class.new(source, *arguments, node.name_loc),
nil,
- operator_loc.slice.to_sym,
- operator_loc,
+ binary_operator_loc.slice.to_sym,
+ binary_operator_loc,
nil,
ArgumentsNode.new(source, 0, [node.value], node.value.location),
nil,
nil,
node.location
),
- node.operator_loc.copy(start_offset: node.operator_loc.end_offset - 1, length: 1),
+ node.binary_operator_loc.copy(start_offset: node.binary_operator_loc.end_offset - 1, length: 1),
node.location
)
end