Losing my latin
ducasse
ducasse at iam.unibe.ch
Sun Dec 30 19:16:00 UTC 2001
Hi
I have the following strange behavior with the parse tree nodes.
Context:
I cannot find where a comment is stored in a returnNode or its child like
the comment at the end of this method.
testCommentAtTheEnd
^ 1 + 2 "a comment after a return"
I looked into the resulting tree and all the comments are nil.
Problem:
I just took my swiss knife and put a self halt in the method that pretty
print a return node.
visitReturn: aNode value: val
self stream nextPutAll: '^ '.
self visitNode: val.
self halt.
self printComment: val.
and I did not get at all the comment pretty printed.
The only change I did was this halt. When I run it and press proceed.
I lost the comment. When I remove the halt from the code I got back the
comment! You can imagine that I retried several times. But apparently I'm
redoing the same error.
Can somebody tell me where I'm wrong???
Thanks
Stef
More information about the Squeak-dev
mailing list
|