Class: Carbon::Compiler::Node::Name
- Defined in:
- lib/carbon/compiler/node/name.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 ⇒ ::String
Fancy inspection.
-
#value ⇒ ::String
The value of the name.
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 ⇒ ::String
Fancy inspection.
21 22 23 |
# File 'lib/carbon/compiler/node/name.rb', line 21 def inspect "#(Name #{value})" end |
#value ⇒ ::String
The value of the name. This is a string representation of the name.
14 15 16 |
# File 'lib/carbon/compiler/node/name.rb', line 14 def value @children[0].value end |