Sha256: 22e3a26f34f8a289efab64113290286e38f99bbab7d28d8e376cb1334eae799a

Contents?: true

Size: 401 Bytes

Versions: 6

Compression:

Stored size: 401 Bytes

Contents

require_relative './node'

module Dentaku
  module AST
    class Operation < Node
      attr_reader :left, :right

      def initialize(left, right)
        @left  = left
        @right = right
      end

      def dependencies(context = {})
        (left.dependencies(context) + right.dependencies(context)).uniq
      end

      def self.right_associative?
        false
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
dentaku-3.3.2 lib/dentaku/ast/operation.rb
dentaku-3.3.1 lib/dentaku/ast/operation.rb
dentaku-3.3.0 lib/dentaku/ast/operation.rb
dentaku-3.2.1 lib/dentaku/ast/operation.rb
dentaku-3.2.0 lib/dentaku/ast/operation.rb
dentaku-3.1.0 lib/dentaku/ast/operation.rb