Hi All,
in ParseNode>>printCommentOn: there is the most perplexing destructive modification of a comment on printing:
printCommentOn: aStream indent: indent
| thisComment |
self comment == nil ifTrue: [^ self].
1 to: self comment size
do: [:index |
index > 1 ifTrue: [aStream crtab: indent].
aStream nextPut: $".
thisComment := self comment at: index.
self printSingleComment: thisComment
on: aStream
indent: indent.
aStream nextPut: $"].
!! self comment: nil
The result is that a parse tree can only be printed once before it prints without comments. Can anyone justify this? I would like to remove it; it makes no sense to me.
best
Eliot