parsers/java/PJTraditionalCommentsNode.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Tue, 21 Apr 2015 14:57:16 +0100
changeset 435 3bc08fb90133
child 436 e1c44b571db9
permissions -rw-r--r--
Initial commit of PetitJava Name: PetitJava-JanKurs.160 Author: JanKurs Time: 19-12-2014, 01:00:18.354 PM UUID: 1cb1b46d-8c68-4751-9720-f0dd742f3e16

"{ Package: 'stx:goodies/petitparser/parsers/java' }"

"{ NameSpace: Smalltalk }"

PJCommentsNode subclass:#PJTraditionalCommentsNode
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'PetitJava-AST'
!

PJTraditionalCommentsNode comment:''
!


!PJTraditionalCommentsNode methodsFor:'as yet unclassified'!

comment: anArray
	| temp temp2 |
	temp := OrderedCollection new.
	temp2 := anArray.
	temp2
		ifNotNil: [ 
			[ temp2 first = '*' and: temp2 second = '/' ]
				whileFalse: [ 
					temp2 first = '*'
						ifFalse: [ temp2 first second ifNotNil: [ temp add: temp2 first second ] ]
						ifTrue: [ temp2 first first ifNotNil: [ temp add: temp2 first first ] ].
					temp2 := temp2 second ].
			comment := (temp collect: #asciiValue) asByteArray asString ].
	anArray isNil
		ifTrue: [ comment := '' ]
!

printOn: aStream
	^	aStream 
		nextPutAll: 'comment value ==> ';
		nextPutAll: self comment.
  
! !

!PJTraditionalCommentsNode class methodsFor:'documentation'!

version_HG

    ^ '$Changeset: <not expanded> $'
! !