Commenting class category

Keith Hodges keith_hodges at yahoo.co.uk
Sun Feb 10 13:35:13 UTC 2008


 Cédrick

Your suggestion of Documentation classes comes but one month after I
suggested the very same. Since each class in squeak may nominate its
#compilerClass and #parserClass it is possible to override these in such
a way as to ignore the method text.

I liked the idea but had several questions as to how to make the idea
work well. I had no replies to these questions, but there was some
debate as to the concept. (If you look in older versions of Sake, in
http://www.squeaksource.com/Sake you will find an implementation lurking
in there some where as SakeDocumentation)

Question 1. As far as my experiments show overriding #compilerClass to
point to a null compiler works. However it only works for instance side
methods. I wanted to know where one can select the #compilerClass for
class side methods.

Question 2. With this scheme no one tells "Shout", so it continues to
try and auto format the text thinking it is a normal method. Is there a
way to make shout aware on a per-class basis what language it is
highlighting.

My personal conclusion was to experiment with the idea to see how useful
it was within a particular domain... my experiment simply causes the
compiler/parser to ignore code after a line consisting of """""".

My second idea is to use the symbol ˚ in methods that are documentation,
such that #task˚ documents #task.

again this is all experimental.

You can get the code to experiment yourself by loading Kernel-Ext from
package 311 on squeaksource.

best regards

Keith




More information about the Squeak-dev mailing list