* ext/ripper/tools/preproc.rb (prelude): do not append surplus

newlines to fix line numbers.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2005-10-20 13:23:26 +00:00
parent 14029df930
commit d284e44687
2 changed files with 6 additions and 3 deletions

View File

@ -1,7 +1,10 @@
Thu Oct 20 22:14:43 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
Thu Oct 20 22:22:49 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parser.y (struct parser_params): parser never modify input string.
* ext/ripper/tools/preproc.rb (prelude): do not append surplus
newlines to fix line numbers.
Thu Oct 20 11:41:57 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
* class.c, eval.c, hash.c, st.c, variable.c: changed /* ??? */ stuff

View File

@ -51,9 +51,9 @@ def prelude(f, out)
out << '%%' << $/
return
when /\A%token/
out << line.sub(/<\w+>/, '<val>') << $/
out << line.sub(/<\w+>/, '<val>')
when /\A%type/
out << line.sub(/<\w+>/, '<val>') << $/
out << line.sub(/<\w+>/, '<val>')
else
out << line
end