class Regexp::Scanner

def emit(type, token, text, ts, te)

Emits an array with the details of the scanned pattern
def emit(type, token, text, ts, te)
  #puts "EMIT: type: #{type}, token: #{token}, text: #{text}, ts: #{ts}, te: #{te}"
  emit_literal if literal
  if block
    block.call type, token, text, ts, te
  end
  tokens << [type, token, text, ts, te]
end