1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* parse.y [ripper]: on__scan event removed.

* parse.y [ripper]: event name is changed: on__XXX -> on_XXX.
* ext/ripper/eventids2.c: ditto.
* ext/ripper/ripper.rb.in: ditto.
* ext/ripper/lib/ripper.rb: sync with ripper.rb.in.
* ext/ripper/lib/ripper/tokenizer: ditto.
* ext/ripper/lib/ripper/filter: new file.
* sample/ripper/colorize.rb: new file.
* sample/ripper/strip-comment.rb: new file.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
aamine 2004-09-22 05:22:50 +00:00
parent 61d1dce5a2
commit 2c17921671
14 changed files with 379 additions and 287 deletions

View file

@ -11,6 +11,6 @@ puts 'static void'
puts 'ripper_init_eventids1()'
puts '{'
ids.each do |id|
puts %Q[ ripper_id_#{id} = rb_intern("on__#{id}");]
puts %Q[ ripper_id_#{id} = rb_intern("on_#{id}");]
end
puts '}'

View file

@ -19,7 +19,7 @@ header
id, arity = line.split
arity = arity.to_i
puts
puts " def on__#{id}#{paramdecl(arity)}"
puts " def on_#{id}#{paramdecl(arity)}"
puts " #{arity == 0 ? 'nil' : 'a'}"
puts " end"
end
@ -28,7 +28,7 @@ header
id, arity = line.split
arity = arity.to_i
puts
puts " def on__#{id}(token)"
puts " def on_#{id}(token)"
puts " token"
puts " end"
end

View file

@ -17,7 +17,7 @@ def main
end
def extract_ids(f)
(f.read.scan(/ripper_id_(\w+)/).flatten - ['scan']).uniq
f.read.scan(/ripper_id_(\w+)/).flatten.uniq
end
main