Class: N65::ExitScope

Inherits:
InstructionBase show all
Defined in:
lib/n65/directives/exit_scope.rb

Overview

This directive to include bytes

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from InstructionBase

#unresolved_symbols?

Class Method Details

.parse(line) ⇒ Object



8
9
10
11
12
13
# File 'lib/n65/directives/exit_scope.rb', line 8

def self.parse(line)
  match_data = line.match(/^\.$/)
  return nil if match_data.nil?

  ExitScope.new
end

Instance Method Details

#exec(assembler) ⇒ Object

Execute on the assembler



16
17
18
# File 'lib/n65/directives/exit_scope.rb', line 16

def exec(assembler)
  assembler.symbol_table.exit_scope
end

#to_sObject

Display



21
22
23
# File 'lib/n65/directives/exit_scope.rb', line 21

def to_s
  '.'
end