Class: Rubycc::Front::AST::Cast

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

Overview

A cast "( type-name ) operand" (ISO C 6.5.4). type is the resolved Rubycc::Type the operand is converted to and operand is the cast-expression to its right. The generator settles which conversions are legal (arithmetic reinterpretation, a pointer retag, discarding a value with "(void)", a null-pointer-constant cast) and emits any code a narrowing needs; the parser only builds the node.

Instance Attribute Summary collapse

Instance Attribute Details

#operandObject (readonly)

Returns the value of attribute operand

Returns:

  • (Object)

    the current value of operand



162
163
164
# File 'lib/rubycc/front/ast.rb', line 162

def operand
  @operand
end

#tokenObject (readonly)

Returns the value of attribute token

Returns:

  • (Object)

    the current value of token



162
163
164
# File 'lib/rubycc/front/ast.rb', line 162

def token
  @token
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



162
163
164
# File 'lib/rubycc/front/ast.rb', line 162

def type
  @type
end