Sha256: 15d56a22e215966f98371a24a65e85ed018cef3afc8e1f56112a8b10f1deef9d
Contents?: true
Size: 893 Bytes
Versions: 15
Compression:
Stored size: 893 Bytes
Contents
# frozen_string_literal: true module Rley # This module is used as a namespace # Namespace dedicated to parse tree formatters. module Formatter # Superclass for parse tree formatters. class BaseFormatter # The IO output stream in which the formatter's result will be sent. # @return [IO] The output stream for the formatter. attr_reader(:output) # Constructor. # @param anIO [IO] an output IO where the formatter's result will # be placed. def initialize(anIO) @output = anIO end # Given a parse tree visitor, perform the visit # and render the visit events in the output stream. # @param aVisitor [ParseTreeVisitor] def render(aVisitor) aVisitor.subscribe(self) aVisitor.start aVisitor.unsubscribe(self) end end # class end # module end # module # End of file
Version data entries
15 entries across 15 versions & 1 rubygems