Class: Chelsy::Typedef
- Inherits:
-
Declarative
- Object
- Node
- Element
- Declarative
- Chelsy::Typedef
- Defined in:
- lib/chelsy/ast.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Attributes inherited from Declarative
Attributes inherited from Element
Instance Method Summary collapse
-
#initialize(name, type, **rest) ⇒ Typedef
constructor
A new instance of Typedef.
Methods inherited from Declarative
Constructor Details
#initialize(name, type, **rest) ⇒ Typedef
Returns a new instance of Typedef.
1126 1127 1128 1129 1130 1131 1132 |
# File 'lib/chelsy/ast.rb', line 1126 def initialize(name, type, **rest) @name = Syntax::Ident.ensure(name) @type = Syntax::Type.ensure(type) rest[:storage] = :typedef super(**rest) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
1124 1125 1126 |
# File 'lib/chelsy/ast.rb', line 1124 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
1124 1125 1126 |
# File 'lib/chelsy/ast.rb', line 1124 def type @type end |