On Mon, 14 Jan 2002, Tobias Reif wrote: > Mathieu Bouchard wrote: > > there. I want to keep "if not" separate from > > "unless" and that kind of thing. > Would it's serialization method (offer various options for) pretty > print(ing)? I'm really lousy at pretty-printing (witness the smelly stuff in the cvs history of ToSource.rb), so I'll leave that to someone else. I'll concentrate on the printing, period. =) > * should offer a complete set of classes and methods, so that any Ruby > program can be generated (including comments, shebangs and all); i'm barely even beginning to think about Annotations. (but it will be a mix-in and a set of options: "keep comments", "keep original source/formatting"). > * 's serialization method(s) should offer some control over layout: > pretty printing; multiple files and locations; etc. ToSource has (had?) several options, e.g. space vs tab indentation, depth of indentation, margins, ... but i didn't go into other policies. Anyway I screwed it up; ToSource's pretty-printer is disabled. What do you mean exactly by "multiple files and locations" ? > ... true, it's cleaner, but in contrary to the first version depends on > indentation. it did _not_. > :) Yep. It looks pretty tedious. > > (At least it's not XML.) > I don't understand what you mean here. XML is tedious, at least for representing programs. > Thus I then can generate code objects by having code parsed, then I can > manipulate the whole construct via many useful methods, and then I can > get it serialized/written out, nicely laid out. And then I can sit there > and smile, if I understood your idea correctly :) Yes. But it has to work first, and I'm not there yet. =) ________________________________________________________________ Mathieu Bouchard http://hostname.2y.net/~matju