# File ext/tools/generate.rb, line 95 def generate_eventids2_table(ids) buf = "" buf << %Q[static void\n] buf << %Q[ripper_init_eventids2_table(VALUE self)\n] buf << %Q[{\n] buf << %Q[ VALUE h = rb_hash_new();\n] buf << %Q[ ID id;\n] buf << %Q[ rb_define_const(self, "SCANNER_EVENT_TABLE", h);\n] ids.each do |id| buf << %Q[ id = rb_intern_const("#{id}");\n] buf << %Q[ rb_hash_aset(h, ID2SYM(id), INT2NUM(1));\n] end buf << %Q[}\n] buf end