Sha256: ed57123a47c179e8a276adc201979b938b708e91eaabe4793b5257932f1fa3eb

Contents?: true

Size: 604 Bytes

Versions: 7

Compression:

Stored size: 604 Bytes

Contents

# frozen_string_literal: true

require_relative 'lox_compound_expr'

module Loxxy
  module Ast
    class LoxBinaryExpr < LoxCompoundExpr
      # @return [Symbol]
      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

      alias operands subnodes
    end # class
  end # module
end # module

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
loxxy-0.0.13 lib/loxxy/ast/lox_binary_expr.rb
loxxy-0.0.12 lib/loxxy/ast/lox_binary_expr.rb
loxxy-0.0.11 lib/loxxy/ast/lox_binary_expr.rb
loxxy-0.0.10 lib/loxxy/ast/lox_binary_expr.rb
loxxy-0.0.9 lib/loxxy/ast/lox_binary_expr.rb
loxxy-0.0.8 lib/loxxy/ast/lox_binary_expr.rb
loxxy-0.0.7 lib/loxxy/ast/lox_binary_expr.rb