diff --git a/ChangeLog b/ChangeLog index 77713b8ed3..c00015e711 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Feb 24 06:40:14 2004 Dave Thomas + + * lib/rdoc/parsers/parse_rb.rb (RubyLex::identify_identifier): Handle + class variables in code listings + Tue Feb 24 06:32:27 2004 Dave Thomas * lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::do_aliases): Handle diff --git a/lib/rdoc/parsers/parse_rb.rb b/lib/rdoc/parsers/parse_rb.rb index fd57ee2e4b..e3af27d3f7 100644 --- a/lib/rdoc/parsers/parse_rb.rb +++ b/lib/rdoc/parsers/parse_rb.rb @@ -917,7 +917,7 @@ class RubyLex end @OP.def_rule('@') do - if peek(0) =~ /[\w_]/ + if peek(0) =~ /[@\w_]/ ungetc identify_identifier else @@ -992,6 +992,8 @@ class RubyLex def identify_identifier token = "" token.concat getc if peek(0) =~ /[$@]/ + token.concat getc if peek(0) == "@" + while (ch = getc) =~ /\w|_/ print ":", ch, ":" if RubyLex.debug? token.concat ch @@ -1003,7 +1005,7 @@ class RubyLex end # fix token -# puts "identifier - #{token}, state = #@lex_state" + # $stderr.puts "identifier - #{token}, state = #@lex_state" case token when /^\$/