Sha256: acfb541502e21dc71a6042870da05a180e533ad1ddfc31c19203cb5c73f8c779
Contents?: true
Size: 1.1 KB
Versions: 11
Compression:
Stored size: 1.1 KB
Contents
# frozen_string_literal: true module Unparser class Emitter # Emitter for class nodes class Class < self include LocalVariableRoot, Terminated handle :class children :name, :superclass, :body private # Perform dispatch # # @return [undefined] # # @api private # def dispatch write(K_CLASS, WS) visit(name) emit_superclass emit_body k_end end # Emit superclass # # @return [undefined] # # @api private # def emit_superclass return unless superclass write(WS, T_LT, WS) visit(superclass) end end # Class # Emitter for sclass nodes class SClass < self include Terminated handle :sclass children :object, :body private # Perform dispatch # # @return [undefined] # # @api private # def dispatch write(K_CLASS, WS, T_DLT, WS) visit(object) emit_body k_end end end # SClass end # Emitter end # Unparser
Version data entries
11 entries across 11 versions & 1 rubygems