Sha256: b9be2e2ec49da28ffa42aa09960dec8931b9e5ee211ff48bf556077b82457776
Contents?: true
Size: 818 Bytes
Versions: 16
Compression:
Stored size: 818 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 public # 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
16 entries across 16 versions & 1 rubygems