Class: Rubycc::Front::ConstantEvaluator::OffsetofTerm

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

Overview

One subscript step of a __builtin_offsetof designator whose index is not a constant expression: its contribution to the offset is the value of index (an expression node the caller lowers) times scale, the element's byte size.

Instance Attribute Summary collapse

Instance Attribute Details

#indexObject (readonly)

Returns the value of attribute index

Returns:

  • (Object)

    the current value of index



93
94
95
# File 'lib/rubycc/front/constant_evaluator.rb', line 93

def index
  @index
end

#scaleObject (readonly)

Returns the value of attribute scale

Returns:

  • (Object)

    the current value of scale



93
94
95
# File 'lib/rubycc/front/constant_evaluator.rb', line 93

def scale
  @scale
end