Compiler, was Re: Block closures

Lex Spoon lex at cc.gatech.edu
Thu Aug 3 13:05:53 UTC 2000


"Roel Wuyts" <rwuyts at vub.ac.be> wrote:
> Indeed, the 'comment-handling' is currently really bad. I would like to
> easily rewrite a parsetree (say, optimize it, refactor it, do Java-like
> before/after stuff), keeping the comments. It is currently possible, but not
> clean at all. Why not have a 'CommentNode', that keeps the position of the
> comment in the source. That way we can 'pull up' the comments from where
> they are living now. Also note that, depending on the builder you use when
> parsing, comments could be enabled or not.
> 
> 

"position in source code" isn't semantically meaningful, and so it
shouldn't be needed in the parse tree.  Much better would be "this
comment comments on this variable", or "this comment is a method
comment".


-Lex





More information about the Squeak-dev mailing list