Class: Rubycc::Front::ScalarInit

Inherits:
Data
  • Object
show all
Defined in:
lib/rubycc/front/initializer_resolver.rb

Overview

One scalar placed by an initializer: value (an expression node) writes type (a scalar Rubycc::Type) at byte offset from the object's start. The caller evaluates value in its own context — folded to a constant for a global, generated and narrowed for a local — so the resolver stays free of the generator and of constant evaluation.

Instance Attribute Summary collapse

Instance Attribute Details

#offsetObject (readonly)

Returns the value of attribute offset

Returns:

  • (Object)

    the current value of offset



14
15
16
# File 'lib/rubycc/front/initializer_resolver.rb', line 14

def offset
  @offset
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



14
15
16
# File 'lib/rubycc/front/initializer_resolver.rb', line 14

def type
  @type
end

#valueObject (readonly)

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



14
15
16
# File 'lib/rubycc/front/initializer_resolver.rb', line 14

def value
  @value
end