Sha256: 213a8ea8f36530329ac82f9322bb07c2acf70126c37671e1507ce6a83d8f3613

Contents?: true

Size: 677 Bytes

Versions: 5

Compression:

Stored size: 677 Bytes

Contents

# frozen_string_literal: true

require_relative 'lox_node'

module Loxxy
  module Ast
    class LoxCompoundExpr < LoxNode
      # @return [Array<Ast::LoxNode>]
      attr_reader :subnodes

      # @param aPosition [Rley::Lexical::Position] Position of the entry in the input stream.
      # @param theSubnodes [Array<Ast::LoxNode>]
      def initialize(aPosition, theSubnodes)
        super(aPosition)
        @subnodes = theSubnodes
      end

      # Part of the 'visitee' role in Visitor design pattern.
      # @param visitor [ASTVisitor] the visitor
      def accept(visitor)
        visitor.visit_compound_expr(self)
      end
    end # class
  end # module
end # module

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
loxxy-0.0.11 lib/loxxy/ast/lox_compound_expr.rb
loxxy-0.0.10 lib/loxxy/ast/lox_compound_expr.rb
loxxy-0.0.9 lib/loxxy/ast/lox_compound_expr.rb
loxxy-0.0.8 lib/loxxy/ast/lox_compound_expr.rb
loxxy-0.0.7 lib/loxxy/ast/lox_compound_expr.rb