Sha256: 3ab4bd55d850f466295813ba01ba8b798f52a05f5a832aa91b2ebf2f9076d855

Contents?: true

Size: 583 Bytes

Versions: 1

Compression:

Stored size: 583 Bytes

Contents

# encoding: utf-8
# frozen_string_literal: true

module Carbon
  module Compiler
    module Node
      class EType < Base
        class Option < Base
          def expand(file)
            children.map do |child|
              # child.is_a?(Node::EType) # => true
              if child.clean?
                type = child.to_type
                last = type.name.parts.last
                { last => type.name.parts }
              else
                child.expand(file, false)
              end
            end.inject(:merge)
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
carbon-compiler-0.2.0 lib/carbon/compiler/node/etype/option.rb