[comp.lang.c++] Indentation of C++

benson@odi.com (Benson I. Margulies) (07/15/89)

I've been working over the PD version of indent from comp.sources.unix.
I've got some useful, but incomplete c++ support. The incompleteness
is twofold: 

1) // comments aren't handled at all.
2) inline functions in class definitions are not
recognized as functions and indented nicely.

Both are hard to fix. indent does a lot of comment rearranging.  (If
you are unfamiliar, please read the man page before responding.)  To
handle both // and /**/ comments would require extensions of its
mechanisms in ways which are unclear to me. I can't imagine 
forswearing /* */, but I can imagine forswearing //. (Obviously
a matter of taste).

Indent's parsing technology may just not be up to recognizing inlines
in the class definitions.

So: I have several possible choices:

1) send it "as is" to comp.sources.unix and the BSD people.
caveator user.

2) distribute it to volunteers from this newsgroup for critique
or improvement.

3) give up in despair.

Would anyone else care to comment on this?



-- 
Benson I. Margulies