Class: Whitespace::ISA::Label
- Inherits:
-
Instruction
- Object
- Instruction
- Whitespace::ISA::Label
- Defined in:
- lib/whitespace/instructions/flow_control/label.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from Instruction
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(vm, name) ⇒ Label
constructor
A new instance of Label.
Constructor Details
#initialize(vm, name) ⇒ Label
Returns a new instance of Label.
5 6 7 8 9 10 11 |
# File 'lib/whitespace/instructions/flow_control/label.rb', line 5 def initialize(vm, name) unless Whitespace::Util.is_label?(name) raise ArgumentError, "must be a label: #{name}" end super(vm) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/whitespace/instructions/flow_control/label.rb', line 3 def name @name end |
Instance Method Details
#execute ⇒ Object
13 14 |
# File 'lib/whitespace/instructions/flow_control/label.rb', line 13 def execute end |