Sha256: 332ba5c33376eb252f9c4957d3d570909ce24d17610774a4dea70682b9339873

Contents?: true

Size: 718 Bytes

Versions: 17

Compression:

Stored size: 718 Bytes

Contents

# frozen_string_literal: true

require_relative 'lox_compound_expr'

module Loxxy
  module Ast
    class LoxLogicalExpr < LoxCompoundExpr
      # @return [Symbol] message name to be sent to receiver
      attr_reader :operator

      # @param aPosition [Rley::Lexical::Position] Position of the entry in the input stream.
      # @param operand1 [Loxxy::Ast::LoxNode]
      # @param operand2 [Loxxy::Ast::LoxNode]
      def initialize(aPosition, anOperator, operand1, operand2)
        super(aPosition, [operand1, operand2])
        @operator = anOperator
      end

      define_accept # Add `accept` method as found in Visitor design pattern
      alias operands subnodes
    end # class
  end # module
end # module

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
loxxy-0.4.08 lib/loxxy/ast/lox_logical_expr.rb
loxxy-0.4.07 lib/loxxy/ast/lox_logical_expr.rb
loxxy-0.4.06 lib/loxxy/ast/lox_logical_expr.rb
loxxy-0.4.05 lib/loxxy/ast/lox_logical_expr.rb
loxxy-0.4.04 lib/loxxy/ast/lox_logical_expr.rb
loxxy-0.4.03 lib/loxxy/ast/lox_logical_expr.rb
loxxy-0.4.02 lib/loxxy/ast/lox_logical_expr.rb
loxxy-0.4.01 lib/loxxy/ast/lox_logical_expr.rb
loxxy-0.4.00 lib/loxxy/ast/lox_logical_expr.rb
loxxy-0.3.03 lib/loxxy/ast/lox_logical_expr.rb
loxxy-0.3.02 lib/loxxy/ast/lox_logical_expr.rb
loxxy-0.3.01 lib/loxxy/ast/lox_logical_expr.rb
loxxy-0.3.00 lib/loxxy/ast/lox_logical_expr.rb
loxxy-0.2.06 lib/loxxy/ast/lox_logical_expr.rb
loxxy-0.2.05 lib/loxxy/ast/lox_logical_expr.rb
loxxy-0.2.04 lib/loxxy/ast/lox_logical_expr.rb
loxxy-0.2.03 lib/loxxy/ast/lox_logical_expr.rb