[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

how to "borrow" the RDoc::RubyParser and HTMLGenerator

Phlip

1/12/2008 1:23:00 AM

Rubies:

I feel like syntax-highlighting some Ruby code, just the same way as RDoc
does.

(Put another way, I'm trying to find a way to extend RDoc.)

So if I have some Ruby, such as 'foo(42)', how do I parse than with RDoc::
RubyParser, to create a stream of tokens? And how do I route those tokens
into Generator::HTMLGenerator, and get a string of HTML
containing 'foo(42)' with the correct colors?

The source code is kind'a snarled together, and I can't find the correct
entry points!

--
Phlip
http://www.oreilly.com/catalog/9780...
^ assert_xpath