Class: HDLRuby::High::Chunk

Inherits:
Low::Chunk show all
Defined in:
lib/HDLRuby/hruby_high.rb

Overview

Describes a non-HDLRuby code chunk.

Instance Attribute Summary

Attributes inherited from Low::Chunk

#name

Attributes included from Low::Hparent

#parent

Instance Method Summary collapse

Methods inherited from Low::Chunk

#add_lump, #c_code_allocate!, #each_lump, #initialize, #to_c

Methods included from Low::Hparent

#scope

Constructor Details

This class inherits a constructor from HDLRuby::Low::Chunk

Instance Method Details

#to_lowObject

Converts the if to HDLRuby::Low.



2032
2033
2034
2035
2036
2037
2038
# File 'lib/HDLRuby/hruby_high.rb', line 2032

def to_low
    return HDLRuby::Low::Chunk.new(self.name,
                                   *self.each_lump.map do |lump|
        lump = lump.respond_to?(:to_low) ? lump.to_low : lump.to_s
        lump
    end)
end