diff --git a/Rakefile b/Rakefile index b0f007c6..48609b11 100644 --- a/Rakefile +++ b/Rakefile @@ -257,7 +257,7 @@ task :up_doc => :rdoc do end RUBYFORGE_TRUNK_DIR = 'L:/rubyforge/trunk/coderay/trunk' -desc 'Export trunk to Rubyforge working copy vis SVN' +desc 'Export trunk to Rubyforge working copy via SVN' task :export do system 'svn st' puts 'Exporting changelog.' diff --git a/lib/coderay/encoders/html.rb b/lib/coderay/encoders/html.rb index 08390ad3..65a7874f 100644 --- a/lib/coderay/encoders/html.rb +++ b/lib/coderay/encoders/html.rb @@ -128,7 +128,7 @@ def self.token_path_to_hint hint, classes when :info_long classes.map { |kind| TOKEN_KIND_TO_INFO[kind] }.join('/') when :debug - k.inspect + classes.inspect end " title=\"#{title}\"" end diff --git a/test/ruby/jarh.out.raydebug b/test/ruby/jarh.out.raydebug new file mode 100644 index 00000000..5fc2f3f0 --- /dev/null +++ b/test/ruby/jarh.out.raydebug @@ -0,0 +1,371 @@ + +ident(print) stringoperator(.)ident(reverse) + +ident(print) stringoperator(.)ident(strip) + +ident(print) operator([)stringoperator(,) pre_constant(nil)operator(,) stringoperator(,) pre_constant(nil)operator(,) stringoperator(,) pre_constant(nil)operator(,) stringoperator(])operator(.)ident(compact) + +operator([)stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(])operator(.)ident(reverse_each) reserved(do) operator(|)ident(x)operator(|) ident(print) ident(x) reserved(end) + +regexpoperator(.)ident(source)operator(.)ident(display) + +ident(send) symbol(:print)operator(,) string + +ident(print) operator([)stringoperator(,) stringoperator(,) stringoperator(]) operator(|) operator([)stringoperator(,) stringoperator(,) stringoperator(]) + +ident(print) operator([)stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(]) operator(-) operator([)stringoperator(]) + +ident(print) operator([)operator([)stringoperator(,) stringoperator(])operator(])operator(.)ident(assoc)operator(()stringoperator(\)) + +ident(print) operator([)stringoperator(])operator(.)ident(pack)operator(()stringoperator(\)) + +ident(print) stringoperator(.)ident(unpack)operator(()stringoperator(\)) + +ident(print) operator([)operator([)stringoperator(])operator(.)ident(pop)operator(])operator(.)ident(sort)operator(.)ident(shift) + +ident(print) operator([)operator([)stringoperator(,) stringoperator(])operator(])operator(.)ident(rassoc)operator(()stringoperator(\)) + +operator({)string operator(=)operator(>) stringoperator(})operator(.)ident(to_a)operator(.)ident(display) + +ident(print) stringoperator(.)ident(succ) + +ident(print) stringoperator(.)ident(swapcase) + +ident(print) operator([)stringoperator(])operator(.)ident(find) operator({)operator(|)ident(x)operator(|) ident(x)operator(}) + +ident(print) stringoperator(.)ident(find_all) operator({)operator(|)ident(x)operator(|) ident(x)operator(})operator(.)ident(join)operator(()stringoperator(\)) + +ident(print) stringoperator(.)ident(grep)operator(()regexpoperator(\))operator(.)ident(join)operator(()stringoperator(\)) + +constant(Ruby) operator(=) string reserved(and) ident(print) constant(Object)operator(.)ident(const_get)operator(()symbol(:Ruby)operator(\)) + +constant(Proc)operator(.)ident(new) operator({)ident(print) stringoperator(})operator([)operator(]) + +ident(print) stringoperator(.)ident(squeeze) + +ident(print) operator([)integer(1249211252)operator(,) integer(543256175)operator(,) integer(1952998770)operator(,) integer(542274914)operator(,) integer(2032167009)operator(,) integer(1667982706)operator(])operator(.)ident(pack)operator(()stringoperator(\))operator(,) string + +global_variable($>) operator(<<) string operator(<<) string operator(<<) string operator(<<) string + +integer(5)operator(.)ident(times) reserved(do)operator(|)ident(i)operator(|)stringoperator(.)ident(scan)operator(()regexpoperator(\)) reserved(do) ident(print) global_variable($&)operator([)ident(i)operator(,)integer(1)operator(]) reserved(end) reserved(end) + +ident(a)operator(=)stringoperator(.)ident(split)operator(()stringoperator(\))operator(;)ident(print) ident(a)operator(.)ident(pop) reserved(while) reserved(not) ident(a)operator(.)ident(empty?) + +ident(print) stringoperator(.)ident(gsub)operator(()regexpoperator(,) stringoperator(\))operator(.)ident(reverse) + +ident(print) regexpoperator(.)ident(match)operator(()stringoperator(\)) + +ident(print) global_variable($&) reserved(if) regexp operator(===) string + +reserved(case) string reserved(when) regexpoperator(;) ident(print) global_variable($~)operator([)integer(0)operator(]) reserved(end) + +ident(print) constant(Marshal)operator(.)ident(load)operator(()constant(Marshal)operator(.)ident(dump)operator(()stringoperator(\))operator(\)) + +stringoperator(.)ident(each_byte) reserved(do) operator(|)ident(x)operator(|) ident(print) ident(x)operator(.)ident(chr) reserved(end) + +ident(print) stringoperator(.)ident(split)operator(()stringoperator(\))operator(.)ident(sort)operator(.)ident(values_at)operator(()integer(1)operator(,)integer(3)operator(,)integer(2)operator(,)integer(4)operator(\)) + +ident(print) stringoperator(.)ident(sub)operator(()stringoperator(,) stringoperator(\)) + +comment(#$><<'RbyckJust another,'.split(''\).values_at(5..16,9,0,6,1,2,9,14,10,3,4,15..17\)) + +operator(()stringoperator(..)stringoperator(\))operator(.)ident(to_a)operator(.)ident(join)operator(.)ident(tr)operator(()stringoperator(,)stringoperator(\))operator(.)ident(display) + +reserved(begin) ident(print) string reserved(ensure) ident(print) string reserved(end) + +stringoperator(.)ident(scan)operator(()regexpoperator(\))operator(.)ident(reverse)operator(.)ident(display) + +stringoperator(.)ident(gsub)operator(()regexpoperator(,)stringoperator(\))operator(.)ident(display) + +ident(a)operator(=)stringoperator(;)integer(0)operator(.)ident(step)operator(()integer(24)operator(,)integer(2)operator(\))operator({)operator(|)ident(i)operator(|)ident(print) ident(a)operator([)ident(i)operator(,)integer(1)operator(])operator(})operator(;)integer(23)operator(.)ident(step)operator(()integer(1)operator(,)integer(-2)operator(\))operator({)operator(|)ident(i)operator(|)ident(print) ident(a)operator([)ident(i)operator(,)integer(1)operator(])operator(}) + +ident(a)operator(=)stringoperator(.)ident(split)operator(()stringoperator(\))operator(;)integer(12)operator(.)ident(times)operator({)ident(print) ident(a)operator(.)ident(shift)operator(,)ident(a)operator(.)ident(pop)operator(})operator(;)ident(print) ident(a) + +ident(a)operator(=)stringoperator(;)reserved(begin) ident(a)operator(.)ident(sub!)operator(()regexpoperator(\))operator({)ident(print) global_variable($1)operator(,)global_variable($3)operator(;)global_variable($2)operator(})reserved(end) reserved(while)global_variable($1)operator(;)ident(print) ident(a) + +ident(a)operator(=)stringoperator(;)integer(11)operator(.)ident(times)operator({)ident(a)operator(.)ident(sub!)operator(()regexpoperator(,)stringoperator(\))operator(})operator(;)ident(print) ident(a) + +ident(print) stringoperator(.)ident(tr_s)operator(()stringoperator(,) stringoperator(\)) + +stringoperator(.)ident(scan)operator(()regexpoperator(\))operator(.)ident(collect!)operator({)operator(|)ident(x)operator(|)operator([)ident(x)operator([)integer(1)operator(])operator(,)ident(x)operator([)integer(0)operator(])operator(])operator(})operator(.)ident(sort)operator(.)ident(collect!)operator({)operator(|)ident(x)operator(|)ident(x)operator([)integer(1)operator(])operator(})operator(.)ident(display) + +stringoperator(.)ident(scan)operator(()regexpoperator(\))operator(.)ident(sort)operator(.)ident(collect!)operator({)operator(|)ident(x)operator(|)ident(x)operator([)integer(1)operator(,)integer(1)operator(])operator(})operator(.)ident(display) + +stringoperator(.)ident(scan)operator(()regexpoperator(\))operator({)ident(print) global_variable($&)operator(.)ident(hex)operator(.)ident(chr)operator(}) + +ident(print) operator([)stringoperator(])operator(.)ident(fill)operator(()stringoperator(\)) + +global_variable($>)operator(<<)operator({)integer(1)operator(=)operator(>)stringoperator(,)integer(2)operator(=)operator(>)stringoperator(,)integer(3)operator(=)operator(>)stringoperator(,)integer(4)operator(=)operator(>)stringoperator(})operator(.)ident(sort)operator(.)ident(to_s)operator(.)ident(delete)operator(()stringoperator(\)) + +constant(Kernel)operator(.)ident(print) string)> + +reserved(class) class(Just_another_Ruby_hackerq)operator(;)reserved(end)operator(;)ident(print) constant(Just_another_Ruby_hackerq)operator(.)ident(to_s)operator(.)ident(tr)operator(()stringoperator(,)stringoperator(\)) + +constant(Kust_another_Ruby_hacker)operator(=)integer(0)operator(;)ident(print) constant(Module)operator(.)ident(constants)operator(.)ident(grep)operator(()regexpoperator(\))operator([)integer(0)operator(])operator(.)ident(tr)operator(()stringoperator(,)stringoperator(\))operator(,) string + +reserved(module) class(Lust_another_Ruby_hackerq)operator(;) ident(print) ident(name)operator(.)ident(tr)operator(()stringoperator(,) stringoperator(\)) reserved(end) + +reserved(class) class(Bar)operator(;) ident(print) string reserved(end) + +reserved(class) class(Baz)operator(;) reserved(def) method(initialize)operator(()operator(\)) ident(print) string reserved(end) reserved(end)operator(;) constant(Baz)operator(.)ident(new) + +ident(eval) stringoperator(.)ident(unpack)operator(()stringoperator(\))operator([)integer(0)operator(]) + +ident(eval) stringoperator(.)ident(unpack)operator(()stringoperator(\))operator([)integer(0)operator(]) + +global_variable($stdout)operator(.)ident(write) string + +stringoperator(.)ident(each) reserved(do) operator(|)ident(x)operator(|) ident(print) ident(x)operator(.)ident(chomp) reserved(end) + +ident(print) global_variable($') reserved(if) regexp operator(===) string + +ident(raise) string reserved(rescue) ident(print) global_variable($!) + +ident(print) constant(File)operator(.)ident(basename)operator(()stringoperator(,)stringoperator(\)) + +ident(proc)operator({)operator(|)ident(x)operator(|)ident(x)operator([)stringoperator(])operator(})operator([)ident(proc)operator({)operator(|)ident(x)operator(|)ident(print) ident(x)operator(})operator(]) + +ident(method)operator(()symbol(:print)operator(\))operator([)stringoperator(]) + +stringoperator(.)ident(method)operator(()symbol(:display)operator(\))operator([)operator(]) + +ident(print) stringoperator(.)ident(replace)operator(()stringoperator(\)) + +ident(instance_eval) reserved(do) ident(print) string reserved(end) + +constant(Kernel)operator(.)ident(module_eval) reserved(do) ident(print) string reserved(end) + +ident(print) stringoperator(%)stringoperator(%)stringoperator(%)string + +ident(print) operator(!)integer(??)operator(?)integer(??)operator(:)integer(??)operator(?)stringoperator(:)integer(??) + +comment(#({}.default='Just another Ruby hacker,'\)[0].display) + +ident(print) constant(Hash)operator([)stringoperator(,) stringoperator(]) + +ident(print) string string string string + +ident(print) constant(File)operator(.)ident(dirname)operator(()stringoperator(\)) + +reserved(def) global_variable($_)operator(.)ident(singleton_method_added)operator(()operator(*)operator(\)) ident(print) string reserved(end) + +ident(print) operator([)stringoperator(])operator(.)ident(delete_at)operator(()integer(0)operator(\)) + +ident(print) string operator(%) string + +stringoperator(.)ident(scan)operator(()regexpoperator(\))operator(.)ident(reverse)operator(.)ident(display) + +operator(()integer(97)operator(..)integer(121)operator(\))operator(.)ident(to_a)operator(.)ident(pack)operator(()stringoperator(\))operator(.)ident(tr)operator(()stringoperator(,)stringoperator(\))operator(.)ident(display) + +stringoperator(.)ident(tr)operator(()stringoperator(,)stringoperator(\))operator(.)ident(display) + +stringoperator(.)ident(scan)operator(()regexpoperator(\))operator(.)ident(reverse)operator(.)ident(display) + +ident(print) stringoperator(%)stringoperator(;)operator(;) + +ident(print)operator(()stringoperator(%) stringoperator(\)) + +stringoperator(.)ident(scan)operator(()regexpoperator(\))operator(.)ident(reverse)operator(.)ident(display) + +ident(print) string operator(*) operator(()string operator(=)operator(~) regexpoperator(\)) + +ident(print) stringoperator(.)ident(unpack)operator(()stringoperator(\))operator(.)ident(pack)operator(()stringoperator(\)) + +ident(print) stringoperator(.)ident(gsub)operator(()regexpoperator(,) stringoperator(\)) + +stringoperator(.)ident(scan)operator(()regexpoperator(\))operator({)operator(|)ident(x)operator(,)ident(y)operator(|) ident(print) ident(y)operator(+)ident(x)operator(}) + +ident(print) stringoperator([)stringoperator(]) + +ident(print) stringoperator([)regexpoperator(]) + +ident(print) operator([)operator(])operator(.)ident(push)operator(()stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(\)) + +ident(print) stringoperator([)integer(0)operator(..)integer(-1)operator(]) + +ident(print) stringoperator(.)ident(instance_eval)operator({)pre_constant(self)operator(}) + +reserved(class) class(String)operator(;) reserved(def) method(+@)operator(()operator(\)) ident(print) pre_constant(self) reserved(end)operator(;) operator(+)string reserved(end) + +ident(print) stringoperator(.)ident(delete)operator(()stringoperator(\)) + +stringoperator(.)ident(gsub)operator(()regexpoperator(,) stringoperator(\))operator(.)ident(display) + +comment(#$><<{'Just another Ruby hacker,'=>''}.default=0) + +ident(print) ident(eval)operator(()stringoperator(.)ident(dump)operator(\)) + +ident(print) stringoperator(.)ident(concat)operator(()integer(?,)operator(\)) + +ident(print) stringoperator(.)ident(intern)operator(.)ident(to_s) + +ident(print) stringoperator(.)ident(dump)operator([)integer(1)operator(..)integer(-2)operator(]) + +stringoperator(.)ident(each_line) reserved(do) operator(|)ident(x)operator(|) ident(print) ident(x) reserved(end) + +operator([)stringoperator(,) stringoperator(])operator(.)ident(each) reserved(do) operator(|)ident(x)operator(|) ident(print) ident(x)operator(.)ident(capitalize) reserved(end) + +ident(printf) stringoperator(,) string + +ident(print) stringoperator(.)ident(split)operator(()regexpoperator(\))operator([)integer(0)operator(]) + +ident(print) stringoperator(.)ident(split)operator(()regexpoperator(\)) + +ident(print) string + +ident(print) constant(String)operator(()operator([)stringoperator(])operator(\)) + +ident(print) ident(catch)operator(()symbol(:x)operator(\))operator({)ident(throw) symbol(:x)operator(,) stringoperator(}) + +ident(r)operator(,)ident(w) operator(=) constant(IO)operator(::)ident(pipe)operator(;)ident(w)operator(.)ident(print) stringoperator(;)ident(w)operator(.)ident(close)operator(;)ident(print) ident(r)operator(.)ident(gets) + +ident(print) ident(sprintf)operator(()stringoperator(,) ident(format)operator(()string operator(%) stringoperator(,) stringoperator(\))operator(\)) + +ident(print) ident(eval)operator(()stringoperator(.)ident(inspect)operator(\)) + +regexpdelimiter(})>delimiter(/)> + +ident(print) stringoperator(.)ident(scan)operator(()regexpoperator(\))operator(.)ident(collect)operator({)operator(|)ident(x)operator(|)ident(x)operator([)integer(0)operator(])operator(})operator(.)ident(pack)operator(()stringoperator(\)) + +ident(print) stringoperator(.)ident(scan)operator(()regexpoperator(\))operator(.)ident(pack)operator(()stringoperator(*)integer(25)operator(\)) + +stringoperator(.)ident(send) stringoperator(.)ident(reverse)operator(.)ident(intern) + +ident(print) stringoperator(.)ident(uniq)operator(.)ident(join)operator(()stringoperator(\)) + +operator({)operator(})operator(.)ident(fetch)operator(()symbol(:x)operator(\))operator({)stringoperator(})operator(.)ident(display) + +operator({)operator(})operator(.)ident(delete)operator(()symbol(:x)operator(\))operator({)stringoperator(})operator(.)ident(display) + +ident(print) operator([)symbol(:x)operator(])operator(.)ident(map)operator({)stringoperator(}) + +operator({)stringoperator(=)operator(>)stringoperator(})operator(.)ident(each)operator({)operator(|*)ident(x)operator(|)ident(print) ident(x)operator(.)ident(reverse)operator(.)ident(join)operator(()stringoperator(\))operator(}) + +ident(print) operator([)operator(])operator(.)ident(unshift)operator(()stringoperator(\))operator(.)ident(unshift)operator(()stringoperator(\))operator(.)ident(join)operator(()stringoperator(\)) + +operator({)integer(3)operator(=)operator(>)stringoperator(,)integer(2)operator(=)operator(>)stringoperator(,)integer(4)operator(=)operator(>)stringoperator(,)integer(1)operator(=)operator(>)stringoperator(})operator(.)ident(values_at)operator(()integer(1)operator(,)integer(2)operator(,)integer(3)operator(,)integer(4)operator(\))operator(.)ident(display) + +ident(print) operator([)operator([)integer(0)operator(,)stringoperator(])operator(,)integer(1)operator(])operator(.)ident(first)operator(.)ident(last) + +operator({)stringoperator(=)operator(>)stringoperator(})operator(.)ident(update)operator(()stringoperator(=)operator(>)stringoperator(\))operator(.)ident(display) + +operator({)symbol(:JARH) operator(=)operator(>) stringoperator(})operator(.)ident(values)operator(.)ident(display) + +operator({)stringoperator(=)operator(>)symbol(:JARH)operator(})operator(.)ident(invert)operator([)symbol(:JARH)operator(])operator(.)ident(display) + +ident(print) operator([)stringoperator(=)operator(>)symbol(:JARH)operator(])operator([)integer(0)operator(])operator(.)ident(keys) + +ident(print) operator([)operator({)operator(})operator(])operator(.)ident(slice)operator(()integer(0)operator(..)integer(0)operator(\))operator([)integer(0)operator(])operator(.)ident(store)operator(()stringoperator(,) stringoperator(\)) + +ident(print) stringoperator(.)ident(split)operator(.)ident(join)operator(()stringoperator(\)) + +reserved(begin) ident(print) string reserved(end) reserved(while) pre_constant(false) + +reserved(begin) reserved(rescue) reserved(then) reserved(else) ident(print) string reserved(end) + +ident(print) regexpoperator(.)ident(match)operator(()stringoperator(\))operator(.)ident(string) + +ident(callcc)operator({)ident(print) stringoperator(}) + +constant(Thread)operator(.)ident(start)operator({)ident(print)stringoperator(})operator(.)ident(join) + +operator(()stringoperator(..)stringoperator(\))operator(.)ident(end)operator(.)ident(display) + +operator(()stringoperator(..)stringoperator(\))operator(.)ident(to_s)operator(.)ident(tr_s)operator(()stringoperator(,) stringoperator(\))operator(.)ident(display) + +reserved(unless) pre_constant(true) reserved(then) reserved(else) string reserved(end)operator(.)ident(display) + +ident(loop) reserved(do) ident(print) stringoperator(;) reserved(break) reserved(end) + +integer(1)operator(.)ident(times) reserved(do) ident(print) string reserved(end) + +integer(0)operator(.)ident(upto)operator(()integer(0)operator(\)) reserved(do) ident(print) string reserved(end) + +integer(0)operator(.)ident(downto)operator(()integer(0)operator(\)) reserved(do) ident(print) string reserved(end) + +ident(print) constant(Struct)operator(.)ident(new)operator(()stringoperator(\))operator(.)ident(to_s)operator(.)ident(split)operator(()stringoperator(\))operator([)integer(2)operator(])operator(.)ident(tr)operator(()stringoperator(,)stringoperator(\))operator(,)string + +reserved(def) operator(()ident(x)operator(=)stringoperator(\))operator(.)ident(foo)operator(()operator(\)) ident(print) pre_constant(self) reserved(end)operator(;) ident(x)operator(.)ident(foo) + +reserved(begin) ident(print) string reserved(end) reserved(until) pre_constant(true) + +reserved(for) ident(i) reserved(in) string reserved(do) ident(print) ident(i) reserved(end) + +stringoperator(.)ident(each_byte) reserved(do) operator(|)ident(x)operator(|) ident(putc) ident(x) reserved(end) + +stringoperator(.)ident(scan)operator(()regexpoperator(\))operator(.)ident(reverse_each) reserved(do) operator(|)ident(x)operator(|) ident(putc) ident(x) reserved(end) + +ident(print) constant(Regexp)operator(.)ident(quote)operator(()stringoperator(\))operator(.)ident(delete)operator(()stringoperator(\)) + +ident(print) pre_constant(true) operator(?) string symbol(:-)constant(P) + +ident(print) pre_constant(true) operator(?) string symbol(:-)constant(D) + +ident(print) operator(*)operator(()stringoperator(..)stringoperator(\))operator(.)ident(to_a) + +ident(print) ident(eval)operator(()string)>operator(\)) + +ident(print) reserved(case) reserved(when) pre_constant(true) reserved(then) string reserved(end) + +ident(print) string operator(*) string + +reserved(begin) reserved(end) reserved(if) ident(print) string + +ident(print) reserved(begin) string reserved(end) + +ident(print) stringoperator(.)ident(center)operator(()integer(10000)operator(\))operator(.)ident(strip) + +ident(print) string reserved(or) ident(print) string reserved(or) ident(print) string reserved(or) ident(print) string + +ident(print) symbol +