Sha256: 3148a75170696604bc9a5ffb50314695339457f2912bdb4b08829a396c12ca18

Contents?: true

Size: 623 Bytes

Versions: 13

Compression:

Stored size: 623 Bytes

Contents

module Steep
  module AST
    module Types
      class Top
        attr_reader :location

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

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

        def hash
          self.class.hash
        end

        alias eql? ==

        def subst(s)
          self
        end

        def to_s
          "⟙"
        end

        include Helper::NoFreeVariables

        def level
          [2]
        end

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

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
steep-0.38.0 lib/steep/ast/types/top.rb
steep-0.37.0 lib/steep/ast/types/top.rb
steep-0.36.0 lib/steep/ast/types/top.rb
steep-0.35.0 lib/steep/ast/types/top.rb
steep-0.34.0 lib/steep/ast/types/top.rb
steep-0.33.0 lib/steep/ast/types/top.rb
steep-0.32.0 lib/steep/ast/types/top.rb
steep-0.31.1 lib/steep/ast/types/top.rb
steep-0.31.0 lib/steep/ast/types/top.rb
steep-0.30.0 lib/steep/ast/types/top.rb
steep-0.29.0 lib/steep/ast/types/top.rb
steep-0.28.0 lib/steep/ast/types/top.rb
steep-0.27.0 lib/steep/ast/types/top.rb