author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Fri, 01 May 2015 13:03:50 +0200 | |
changeset 440 | d35dbde9b971 |
parent 436 | e1c44b571db9 |
permissions | -rw-r--r-- |
435 | 1 |
"{ Package: 'stx:goodies/petitparser/parsers/java' }" |
2 |
||
3 |
"{ NameSpace: Smalltalk }" |
|
4 |
||
5 |
PJCommentsNode subclass:#PJEndOfLineCommentsNode |
|
6 |
instanceVariableNames:'' |
|
7 |
classVariableNames:'' |
|
8 |
poolDictionaries:'' |
|
9 |
category:'PetitJava-AST' |
|
10 |
! |
|
11 |
||
12 |
!PJEndOfLineCommentsNode class methodsFor:'as yet unclassified'! |
|
13 |
||
14 |
comment: aString |
|
15 |
^(self new) comment: aString; yourself. |
|
16 |
! ! |
|
17 |
||
18 |
!PJEndOfLineCommentsNode methodsFor:'as yet unclassified'! |
|
19 |
||
20 |
comment: aString |
|
21 |
aString ifNotNil: [ comment := (aString collect: #asciiValue) asByteArray asString ]. |
|
22 |
aString ifNil: [ comment := '' ] |
|
23 |
! |
|
24 |
||
25 |
printOn: aStream |
|
440
d35dbde9b971
Syntax fix for Smalltalk/X - stc does not allow for empty statements.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
436
diff
changeset
|
26 |
^ aStream |
435 | 27 |
nextPutAll: 'EndOfLineComment value ==> '; |
28 |
nextPutAll: self comment. |
|
29 |
||
30 |
! ! |
|
31 |