Sha256: 1205a61e59b0229e97800cc5879512280881c87fb1d85658284c80f7013fe475

Contents?: true

Size: 508 Bytes

Versions: 1

Compression:

Stored size: 508 Bytes

Contents

# encoding: utf-8
# frozen_string_literal: true

module Carbon
  module Compiler
    module Node
      # The root node.  This is the topmost level node, and includes
      # all declarations, definitions, and directives.
      class Root < Base
        # The "name" of the root.
        #
        # @return [Carbon::Concrete::Type]
        def name
          @children.select(&:identity?).last[0]
        end

        def inspect
          "#[Module #{name.inspect}]"
        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/root.rb