Class: RLSL::Prism::IR::Constant

Inherits:
Node
  • Object
show all
Defined in:
lib/rlsl/prism/ir/expressions.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#type

Instance Method Summary collapse

Methods inherited from Node

#accept, visits

Constructor Details

#initialize(name, type = :float) ⇒ Constant

Returns a new instance of Constant.



152
153
154
155
156
# File 'lib/rlsl/prism/ir/expressions.rb', line 152

def initialize(name, type = :float)
  super()
  @name = name
  @type = type
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



148
149
150
# File 'lib/rlsl/prism/ir/expressions.rb', line 148

def name
  @name
end