mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
19 lines
269 B
Ruby
19 lines
269 B
Ruby
|
#
|
||
|
# 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 '}'
|