Method: Interscript::Compiler::Javascript#parallel_regexp_compile

Defined in:
lib/interscript/compiler/javascript.rb

#parallel_regexp_compile(subs_hash) ⇒ Object



45
46
47
48
49
50
51
52
# File 'lib/interscript/compiler/javascript.rb', line 45

def parallel_regexp_compile(subs_hash)
  # puts subs_hash.inspect
  regexp = subs_hash.each_with_index.map do |p,i|
    "(?<_%d>%s)" % [i,p[0]]
  end.join("|")
  subs_regexp = regexp
  # puts subs_regexp.inspect
end