Sha256: e6c31ac64445a9fc0f5273e66ca4c676fd1396ccfbbd86af13cd033d02e737a7

Contents?: true

Size: 1.15 KB

Versions: 8

Compression:

Stored size: 1.15 KB

Contents

module Steep
  module AST
    module Types
      module Logic
        class Base
          attr_reader :location

          def subst(s)
            self
          end

          def free_variables
            @fvs ||= Set[]
          end

          def hash
            self.class.hash
          end

          def ==(other)
            other.class ==self.class
          end

          alias eql? ==

          def to_s
            "<% #{self.class} %>"
          end
        end

        class Not < Base
          def initialize(location: nil)
            @location = location
          end
        end

        class ReceiverIsNil < Base
          def initialize(location: nil)
            @location = location
          end
        end

        class ReceiverIsNotNil < Base
          def initialize(location: nil)
            @location = location
          end
        end

        class ReceiverIsArg < Base
          def initialize(location: nil)
            @location = location
          end
        end

        class ArgIsReceiver < Base
          def initialize(location: nil)
            @location = location
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
steep-0.35.0 lib/steep/ast/types/logic.rb
steep-0.34.0 lib/steep/ast/types/logic.rb
steep-0.33.0 lib/steep/ast/types/logic.rb
steep-0.32.0 lib/steep/ast/types/logic.rb
steep-0.31.1 lib/steep/ast/types/logic.rb
steep-0.31.0 lib/steep/ast/types/logic.rb
steep-0.30.0 lib/steep/ast/types/logic.rb
steep-0.29.0 lib/steep/ast/types/logic.rb