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.



196
197
198
# File 'lib/odin/transform/transform_types.rb', line 196

def initialize(value)
  @value = value
end

Instance Attribute Details

#valueObject (readonly)

DynValue



194
195
196
# File 'lib/odin/transform/transform_types.rb', line 194

def value
  @value
end

Instance Method Details

#==(other) ⇒ Object



200
201
202
# File 'lib/odin/transform/transform_types.rb', line 200

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