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

P

Phlip

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top