Sha256: 7770fa20b118501aa6ab1f5f14abf910e44cf0658da8e3758eec6e900dd5ad65
Contents?: true
Size: 845 Bytes
Versions: 6
Compression:
Stored size: 845 Bytes
Contents
require_relative 'parse_tree_node' # Load superclass module Rley # This module is used as a namespace module PTree # This module is used as a namespace class NonTerminalNode < ParseTreeNode # Link to the input token attr_reader(:children) def initialize(aSymbol, aRange) super(aSymbol, aRange) @children = [] end # @param aChildNode [ParseTreeNode-like] a child node. def add_child(aChildNode) children << aChildNode end # Part of the 'visitee' role in Visitor design pattern. # @param aVisitor[ParseTreeVisitor] the visitor def accept(aVisitor) aVisitor.start_visit_nonterminal(self) aVisitor.visit_children(self) aVisitor.end_visit_nonterminal(self) end end # class end # module end # module # End of file
Version data entries
6 entries across 6 versions & 1 rubygems