Class: C::CompoundLiteral

Inherits:
Object
  • Object
show all
Defined in:
lib/csquare.rb

Overview

e.g., (struct TYPE) { -x.n, x.d }

Instance Method Summary collapse

Instance Method Details

#recursively_replace_casts!(typenames_and_types) ⇒ Object

Recursively replace typenames with actual types.



621
622
623
624
625
626
627
# File 'lib/csquare.rb', line 621

def recursively_replace_casts! typenames_and_types
  each do |n|
    n.recursively_replace_casts! typenames_and_types
  end

  self.type.name = typenames_and_types[self.type.name] if (self.type.CustomType? || self.type.Struct?) && typenames_and_types.has_key?(self.type.name)
end

#return_typename(function, blueprint) ⇒ Object



612
613
614
# File 'lib/csquare.rb', line 612

def return_typename function, blueprint
  return self.type.name
end

#underlying_typenameObject



616
617
618
# File 'lib/csquare.rb', line 616

def underlying_typename
  self.type.name
end