From 6a24d7ed9b5cbe0d7caa74869aa83cd8a412394d Mon Sep 17 00:00:00 2001 From: aamine Date: Fri, 4 Feb 2005 05:33:53 +0000 Subject: [PATCH] * ext/ripper/lib/ripper/filter.rb: ripper/tokenizer -> ripper/lexer. [ruby-dev:25632] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ ext/ripper/lib/ripper/filter.rb | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1d0f0918aa..8f7f5642e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Feb 4 14:33:25 2005 Minero Aoki + + * ext/ripper/lib/ripper/filter.rb: ripper/tokenizer -> + ripper/lexer. [ruby-dev:25632] + Fri Feb 4 00:24:15 2005 Kouhei Sutou * lib/rss: supported Image module. diff --git a/ext/ripper/lib/ripper/filter.rb b/ext/ripper/lib/ripper/filter.rb index 061bf109d0..99c11182a1 100644 --- a/ext/ripper/lib/ripper/filter.rb +++ b/ext/ripper/lib/ripper/filter.rb @@ -8,7 +8,7 @@ # For details of Ruby License, see ruby/COPYING. # -require 'ripper/tokenizer' +require 'ripper/lexer' class Ripper @@ -17,14 +17,14 @@ class Ripper class Filter def initialize(src, filename = '-', lineno = 1) - @__parser = Tokenizer.new(src, filename, lineno) + @__lexer = Lexer.new(src, filename, lineno) @__line = nil @__col = nil end # The file name of the input. def filename - @__parser.filename + @__lexer.filename end # The line number of the current token. @@ -45,7 +45,7 @@ class Ripper # It is passed to the next event handler (as of Enumerable#inject). def parse(init = nil) data = init - @__parser.parse.each do |pos, event, tok| + @__lexer.lex.each do |pos, event, tok| @__line, @__col = *pos data = if respond_to?(event, true) then __send__(event, tok, data)