Class: OrigenTesters::Decompiler::Nodes::CommentBlock

Inherits:
Node
  • Object
show all
Defined in:
lib/origen_testers/decompiler/nodes.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#context, #type

Instance Method Summary collapse

Methods inherited from Node

inherited, #platform_nodes

Constructor Details

#initialize(comments:, context:) ⇒ CommentBlock

Returns a new instance of CommentBlock.


47
48
49
50
# File 'lib/origen_testers/decompiler/nodes.rb', line 47

def initialize(comments:, context:)
  @comments = comments
  super(context: context, type: :comment_block)
end

Instance Attribute Details

#commentsObject (readonly)

Returns the value of attribute comments.


45
46
47
# File 'lib/origen_testers/decompiler/nodes.rb', line 45

def comments
  @comments
end

Instance Method Details

#execute!(context) ⇒ Object


56
57
58
# File 'lib/origen_testers/decompiler/nodes.rb', line 56

def execute!(context)
  @comments.each { |c| cc(c) }
end

#execute?Boolean

Returns:

  • (Boolean)

52
53
54
# File 'lib/origen_testers/decompiler/nodes.rb', line 52

def execute?
  true
end