Method: N65::Org.parse

Defined in:
lib/n65/directives/org.rb

.parse(line) ⇒ Object

Try to parse an .org statement



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

def self.parse(line)
  match_data = line.match(/^\.org\s+\$([0-9A-Fa-f]{4})$/)
  return nil if match_data.nil?
  address = match_data[1].to_i(16)
  Org.new(address)
end