Class: Carbon::Compiler::Node::Root
- Defined in:
- lib/carbon/compiler/node/root.rb
Overview
The root node. This is the topmost level node, and includes all declarations, definitions, and directives.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #inspect ⇒ Object
-
#name ⇒ Carbon::Concrete::Type
The “name” of the root.
Methods inherited from Base
#[], #accept, #attributes!, #behavior?, #data, #data?, #each, #identity?, #initialize, #map!, mapping, #merge!, #type!, #update!
Constructor Details
This class inherits a constructor from Carbon::Compiler::Node::Base
Instance Method Details
#inspect ⇒ Object
17 18 19 |
# File 'lib/carbon/compiler/node/root.rb', line 17 def inspect "#[Module #{name.inspect}]" end |
#name ⇒ Carbon::Concrete::Type
The “name” of the root.
13 14 15 |
# File 'lib/carbon/compiler/node/root.rb', line 13 def name @children.select(&:identity?).last[0] end |