Sha256: cd976804122c70eac392aa05e79aa7d220a1a85a952dfafbc2cd5ff609a817d5

Contents?: true

Size: 598 Bytes

Versions: 1

Compression:

Stored size: 598 Bytes

Contents

module Steep
  module AST
    module Types
      class Void
        attr_reader :location

        def initialize(location: nil)
          @location = location
        end

        def ==(other)
          other.is_a?(Void)
        end

        def hash
          self.class.hash
        end

        alias eql? ==

        def subst(s)
          self
        end

        def to_s
          "void"
        end

        def free_variables
          Set.new
        end

        def with_location(new_location)
          self.class.new(location: new_location)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
steep-0.4.0 lib/steep/ast/types/void.rb