class Unparser::Emitter::Repetition
Emitter for while and until nodes
def dispatch
def dispatch if postcontrol? emit_postcontrol else emit_normal end end
def emit_keyword
def emit_keyword write(MAP.fetch(node.type), ' ') end
def emit_normal
def emit_normal emit_keyword visit(condition) if body emit_body(body) else nl end k_end end
def emit_postcontrol
def emit_postcontrol visit(body) ws emit_keyword visit(condition) end
def postcontrol?
def postcontrol? body && local_variable_scope.first_assignment_in?(body, condition) end