Sha256: 28b7a0161de72fa02afa12a9edd5a2f1b23574243ceb39c5306dd1201c7f7709
Contents?: true
Size: 804 Bytes
Versions: 23
Compression:
Stored size: 804 Bytes
Contents
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. 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
23 entries across 23 versions & 1 rubygems