defunkt / tomdoc

A TomDoc Ruby library.
http://tomdoc.org/
MIT License
114 stars 16 forks source link

Parser rewrite and some help #19

Open trans opened 12 years ago

trans commented 12 years ago

I endeavoured to rewrite the parser to a) make it not lazy and instead parse everything is a single pass, and b) support the latest spec of TomDoc.

Here is my branch: https://github.com/defunkt/tomdoc/tree/rewrite

The parser is passing it's tests, but I ran into an issue with the generators. For some reason the comments are not getting to the parser? Given how my rewrite changed the parser, I'm guessing that the comment is being injected into the TomDoc object sometime after it has been initialized with a blank comment. Unfortunately I can't seem to find where that's happening, or if my hypothesis is even correct, let alone how to adjust things to fix the problem.

@defunkt Could you have a look at this and see what I'm missing?

trans commented 12 years ago

Note this is the only file I changed: https://github.com/defunkt/tomdoc/blob/rewrite/lib/tomdoc/tomdoc.rb