chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Re: I need some help to edit a tree


From: Shawn Rutledge
Subject: Re: [Chicken-users] Re: I need some help to edit a tree
Date: Thu, 1 Mar 2007 18:44:02 -0700

Do you think it's a good idea to write a kind of advanced
libreadline/editor which operates on S-EXPs, not on strings ? To
manage source code, documenting it, ...

Yes this is something I wanted to do eventually, after I have created
the GUI system that I can use to build the editor.

BTW I think others have worked on a way to create documentation
comments with S-expressions that have no effect at execution time (at
least, if the program is compiled), but you can parse the source file
to extract those comments and generate JavaDoc or Doxygen-style
documentation.  I don't remember much about it except that I googled a
couple years ago and found something like that.  Otherwise, the editor
has to deal with semicolon comments which would be a bit of extra
trouble.  Like if you see a semicolon outside a string, store the rest
of the text from there to EOL as an object that can be identified
later, which also contains a flag that tells you whether the comment
was on the same line as the code before it, or on a line by itself.
That way you could reproduce the source file more or less as it was,
by writing a special pretty-print function.  And you'd need to do
something similar for block comments, too.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]