Sha256: b886b6c921a9bb576eb4798753322e5e226a4a1f82a3cb9d8a557d91e5804a0a
Contents?: true
Size: 1.8 KB
Versions: 6
Compression:
Stored size: 1.8 KB
Contents
# encoding: utf-8 module Unparser class Emitter # Emitter for rescue body nodes class Resbody < self children :exception, :assignment, :body # Emitter for resbody in standalone form class Standalone < self private # Perform dispatch # # @return [undefined] # # @api private # def dispatch write(K_RESCUE, WS) visit_plain(body) end # Emit exception # # @return [undefined] # # @api private # def emit_exception return unless exception ws delimited(exception.children) end # Emit assignment # # @return [undefined] # # @api private # def emit_assignment return unless assignment write(WS, T_ASR, WS) visit(assignment) end end # Emitter for resbody in keyworkd-embedded form class Embedded < self handle :resbody private # Perform dispatch # # @return [undefined] # # @api private # def dispatch write(K_RESCUE) emit_exception emit_assignment emit_body end # Emit exception # # @return [undefined] # # @api private # def emit_exception return unless exception ws delimited(exception.children) end # Emit assignment # # @return [undefined] # # @api private # def emit_assignment return unless assignment write(WS, T_ASR, WS) visit(assignment) end end # Resbody end end # Emitter end # Unparser
Version data entries
6 entries across 6 versions & 1 rubygems