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.



2304
2305
2306
2307
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 2304

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.



2310
2311
2312
2313
2314
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 2310

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