Class: RLSL::Prism::IR::VarDecl
- Defined in:
- lib/rlsl/prism/ir/expressions.rb
Instance Attribute Summary collapse
-
#initializer ⇒ Object
readonly
Returns the value of attribute initializer.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(name, initializer, type = nil) ⇒ VarDecl
constructor
A new instance of VarDecl.
Methods inherited from Node
Constructor Details
#initialize(name, initializer, type = nil) ⇒ VarDecl
Returns a new instance of VarDecl.
22 23 24 25 26 27 |
# File 'lib/rlsl/prism/ir/expressions.rb', line 22 def initialize(name, initializer, type = nil) super() @name = name @initializer = initializer @type = type end |
Instance Attribute Details
#initializer ⇒ Object (readonly)
Returns the value of attribute initializer.
18 19 20 |
# File 'lib/rlsl/prism/ir/expressions.rb', line 18 def initializer @initializer end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
18 19 20 |
# File 'lib/rlsl/prism/ir/expressions.rb', line 18 def name @name end |