Sha256: 1704d6003897c510863d8b0311fba2ba1254f9ae22afe844ae08c5b2079f30f4

Contents?: true

Size: 587 Bytes

Versions: 26

Compression:

Stored size: 587 Bytes

Contents

module Steep
  module AST
    module Types
      module Helper
        module ChildrenLevel
          def level_of_children(children)
            children.map(&:level).sort {|a, b| b.size <=> a.size }.inject() do |a, b|
              a.zip(b).map do |(x, y)|
                if x && y
                  x + y
                else
                  x || y
                end
              end
            end || []
          end
        end

        module NoFreeVariables
          def free_variables()
            @fvs ||= Set.new
          end
        end
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
steep-0.48.0 lib/steep/ast/types/helper.rb
steep-0.47.1 lib/steep/ast/types/helper.rb
steep-0.47.0 lib/steep/ast/types/helper.rb
steep-0.46.0 lib/steep/ast/types/helper.rb
steep-0.45.0 lib/steep/ast/types/helper.rb
steep-0.44.1 lib/steep/ast/types/helper.rb
steep-0.44.0 lib/steep/ast/types/helper.rb
steep-0.43.1 lib/steep/ast/types/helper.rb
steep-0.43.0 lib/steep/ast/types/helper.rb
steep-0.42.0 lib/steep/ast/types/helper.rb
steep-0.41.0 lib/steep/ast/types/helper.rb
steep-0.40.0 lib/steep/ast/types/helper.rb
steep-0.39.0 lib/steep/ast/types/helper.rb
steep-0.38.0 lib/steep/ast/types/helper.rb
steep-0.37.0 lib/steep/ast/types/helper.rb
steep-0.36.0 lib/steep/ast/types/helper.rb
steep-0.35.0 lib/steep/ast/types/helper.rb
steep-0.34.0 lib/steep/ast/types/helper.rb
steep-0.33.0 lib/steep/ast/types/helper.rb
steep-0.32.0 lib/steep/ast/types/helper.rb