Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
mbj committed Aug 31, 2024
1 parent f5c44b7 commit 2163503
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions lib/unparser/emitter/array.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ class Emitter
class Array < self
handle :array

def emit_heredoc_reminders
emitters.each(&:emit_heredoc_reminders)
def emit_heredoc_remainders
emitters.each(&:emit_heredoc_remainders)
end

private
Expand Down
4 changes: 2 additions & 2 deletions lib/unparser/emitter/assignment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ def symbol_name
true
end

def emit_heredoc_reminders
def emit_heredoc_remainders
return unless right

emitter(right).emit_heredoc_reminders
emitter(right).emit_heredoc_remainders
end

private
Expand Down
4 changes: 2 additions & 2 deletions lib/unparser/emitter/begin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ class Begin < self
handle :begin
children :body

def emit_heredoc_reminders
def emit_heredoc_remainders
children.each do |child|
emitter(child).emit_heredoc_reminders
emitter(child).emit_heredoc_remainders
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/unparser/emitter/block.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def dispatch
ws
write_open
emit_block_arguments unless n_lambda?(target)
target_writer.emit_heredoc_reminders if n_send?(target)
target_writer.emit_heredoc_remainders if n_send?(target)
emit_optional_body_ensure_rescue(body)
write_close
end
Expand Down
2 changes: 1 addition & 1 deletion lib/unparser/emitter/dstr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class DStr < self

handle :dstr

def emit_heredoc_reminders
def emit_heredoc_remainders
writer_with(Writer::DynamicString, node).emit_heredoc_reminder
end

Expand Down
4 changes: 2 additions & 2 deletions lib/unparser/emitter/flow_modifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class FlowModifier < self

handle(*MAP.keys)

def emit_heredoc_reminders
def emit_heredoc_remainders
children.each do |node|
emitter(node).emit_heredoc_reminders
emitter(node).emit_heredoc_remainders
end
end

Expand Down
4 changes: 2 additions & 2 deletions lib/unparser/emitter/hash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Emitter
class Hash < self
handle :hash

def emit_heredoc_reminders
def emit_heredoc_remainders
children.each(&method(:emit_heredoc_reminder_member))
end

Expand All @@ -25,7 +25,7 @@ def dispatch
end

def emit_heredoc_reminder_member(node)
emitter(node.children.last).emit_heredoc_reminders if n_pair?(node)
emitter(node.children.last).emit_heredoc_remainders if n_pair?(node)
end

def emit_hash_body
Expand Down
4 changes: 2 additions & 2 deletions lib/unparser/emitter/index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class Assign < self

private_constant(*constants(false))

def emit_heredoc_reminders
emitter(children.last).emit_heredoc_reminders
def emit_heredoc_remainders
emitter(children.last).emit_heredoc_remainders
end

def dispatch
Expand Down
12 changes: 6 additions & 6 deletions lib/unparser/emitter/op_assign.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class BinaryAssign < self

handle(*MAP.keys)

def emit_heredoc_reminders
emitter(target).emit_heredoc_reminders
emitter(expression).emit_heredoc_reminders
def emit_heredoc_remainders
emitter(target).emit_heredoc_remainders
emitter(expression).emit_heredoc_remainders
end

private
Expand All @@ -35,9 +35,9 @@ class OpAssign < self

children :target, :operator, :value

def emit_heredoc_reminders
emitter(target).emit_heredoc_reminders
emitter(value).emit_heredoc_reminders
def emit_heredoc_remainders
emitter(target).emit_heredoc_remainders
emitter(value).emit_heredoc_remainders
end

private
Expand Down
4 changes: 2 additions & 2 deletions lib/unparser/emitter/send.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ def emit_mlhs
writer.emit_mlhs
end

def emit_heredoc_reminders
writer.emit_heredoc_reminders
def emit_heredoc_remainders
writer.emit_heredoc_remainders
end

private
Expand Down
6 changes: 3 additions & 3 deletions lib/unparser/generation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Generation

private_constant(*constants(false))

def emit_heredoc_reminders; end
def emit_heredoc_remainders; end

def symbol_name; end

Expand Down Expand Up @@ -210,7 +210,7 @@ def emit_body_ensure_rescue(node)
def emit_rescue_postcontrol(node)
writer = writer_with(Writer::Rescue, node)
writer.emit_postcontrol
writer.emit_heredoc_reminders
writer.emit_heredoc_remainders
end

def emit_rescue_regular(node)
Expand All @@ -232,7 +232,7 @@ def visit(node)
def visit_deep(node)
emitter(node).tap do |emitter|
emitter.write_to_buffer
emitter.emit_heredoc_reminders
emitter.emit_heredoc_remainders
end
end

Expand Down
4 changes: 2 additions & 2 deletions lib/unparser/writer/rescue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def emit_regular
end
end

def emit_heredoc_reminders
emitter(body).emit_heredoc_reminders
def emit_heredoc_remainders
emitter(body).emit_heredoc_remainders
end

def emit_postcontrol
Expand Down
6 changes: 3 additions & 3 deletions lib/unparser/writer/send.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def emit_selector
write(details.string_selector)
end

def emit_heredoc_reminders
emitter(receiver).emit_heredoc_reminders if receiver
def emit_heredoc_remainders
emitter(receiver).emit_heredoc_remainders if receiver
arguments.each(&method(:emit_heredoc_reminder))
end

Expand Down Expand Up @@ -79,7 +79,7 @@ def emit_normal_arguments
end

def emit_heredoc_reminder(argument)
emitter(argument).emit_heredoc_reminders
emitter(argument).emit_heredoc_remainders
end

def avoid_clash?
Expand Down

0 comments on commit 2163503

Please sign in to comment.