Class: Odin::Transform::LiteralExpr

Inherits:
FieldExpression show all
Defined in:
lib/odin/transform/transform_types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ LiteralExpr

Returns a new instance of LiteralExpr.



181
182
183
# File 'lib/odin/transform/transform_types.rb', line 181

def initialize(value)
  @value = value
end

Instance Attribute Details

#valueObject (readonly)

DynValue



179
180
181
# File 'lib/odin/transform/transform_types.rb', line 179

def value
  @value
end

Instance Method Details

#==(other) ⇒ Object



185
186
187
# File 'lib/odin/transform/transform_types.rb', line 185

def ==(other)
  other.is_a?(LiteralExpr) && value == other.value
end