435
|
1 |
"{ Package: 'stx:goodies/petitparser/parsers/java' }"
|
|
2 |
|
|
3 |
"{ NameSpace: Smalltalk }"
|
|
4 |
|
|
5 |
PJCommentsNode subclass:#PJTraditionalCommentsNode
|
|
6 |
instanceVariableNames:''
|
|
7 |
classVariableNames:''
|
|
8 |
poolDictionaries:''
|
|
9 |
category:'PetitJava-AST'
|
|
10 |
!
|
|
11 |
|
|
12 |
|
|
13 |
!PJTraditionalCommentsNode methodsFor:'as yet unclassified'!
|
|
14 |
|
|
15 |
comment: anArray
|
|
16 |
| temp temp2 |
|
|
17 |
temp := OrderedCollection new.
|
|
18 |
temp2 := anArray.
|
|
19 |
temp2
|
|
20 |
ifNotNil: [
|
|
21 |
[ temp2 first = '*' and: temp2 second = '/' ]
|
|
22 |
whileFalse: [
|
|
23 |
temp2 first = '*'
|
|
24 |
ifFalse: [ temp2 first second ifNotNil: [ temp add: temp2 first second ] ]
|
|
25 |
ifTrue: [ temp2 first first ifNotNil: [ temp add: temp2 first first ] ].
|
|
26 |
temp2 := temp2 second ].
|
|
27 |
comment := (temp collect: #asciiValue) asByteArray asString ].
|
|
28 |
anArray isNil
|
|
29 |
ifTrue: [ comment := '' ]
|
|
30 |
!
|
|
31 |
|
|
32 |
printOn: aStream
|
|
33 |
^ aStream
|
|
34 |
nextPutAll: 'comment value ==> ';
|
|
35 |
nextPutAll: self comment.
|
|
36 |
|
|
37 |
! !
|
|
38 |
|
|
39 |
!PJTraditionalCommentsNode class methodsFor:'documentation'!
|
|
40 |
|
|
41 |
version_HG
|
|
42 |
|
|
43 |
^ '$Changeset: <not expanded> $'
|
|
44 |
! !
|
|
45 |
|