summaryrefslogtreecommitdiff
path: root/ext/ripper/tools/generate-eventids1.rb
blob: de0e27b89c99dad8000b0f8073d289ed2f205c5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#
# generate-eventids1.rb
#

ids = ARGF.map {|s| s.strip }

ids.each do |id|
  puts "static ID ripper_id_#{id};"
end

puts
puts 'static void'
puts 'ripper_init_eventids1()'
puts '{'
ids.each do |id|
  puts %Q[    ripper_id_#{id} = rb_intern("on__#{id}");]
end
puts '}'