Class: RubyHDL::High::Statement

Inherits:
Object
  • Object
show all
Defined in:
lib/HDLRuby/std/sequencer_sw.rb

Overview

Describes a SW implementation of a statement.

Direct Known Subclasses

Print, Sbreak, Scontinue, Sif, Siter, Sloop, Sreturn, Step, Sterminate, Swhile, Sync, Transmit

Instance Method Summary collapse

Instance Method Details

#each_statement(&ruby_block) ⇒ Object

Iterate on the statements.



2193
2194
2195
2196
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 2193

def each_statement(&ruby_block)
  return to_enum(:each_statement) unless ruby_block
  # By default nothing to do.
end

#each_statement_deep(&ruby_block) ⇒ Object

Iterate deeply on the statements.



2199
2200
2201
2202
2203
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 2199

def each_statement_deep(&ruby_block)
  return to_enum(:each_statement_deep) unless ruby_block
  # Just apply ruby_block on self.
  ruby_block.call(self)
end