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

Try to parse an incbin directive



13
14
15
16
17
# File 'lib/n65/directives/exit_scope.rb', line 13

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



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

def exec(assembler)
  assembler.symbol_table.exit_scope
end

#to_sObject

Display



29
30
31
# File 'lib/n65/directives/exit_scope.rb', line 29

def to_s
  "."
end