class Unparser::Emitter::MLHS
Emitter
for multiple assignment left hand side
Constants
- NO_COMMA
Private Instance Methods
dispatch()
click to toggle source
# File lib/unparser/emitter/mlhs.rb, line 15 def dispatch if children.one? emit_one_child_mlhs else emit_many end end
emit_many()
click to toggle source
# File lib/unparser/emitter/mlhs.rb, line 31 def emit_many parentheses do delimited(children) do |node| emitter(node).emit_mlhs end end end
emit_one_child_mlhs()
click to toggle source
# File lib/unparser/emitter/mlhs.rb, line 23 def emit_one_child_mlhs child = children.first parentheses do emitter(child).emit_mlhs write(',') unless NO_COMMA.include?(child.type) end end