Fixes for Smalltalk/X:
* do not use Squeakism CharacterSet, use plain old String instead for portability reasons.
--- a/parsers/java/PPJavaTokenParser.st Tue Apr 21 17:20:11 2015 +0100
+++ b/parsers/java/PPJavaTokenParser.st Tue Apr 21 17:30:40 2015 +0100
@@ -12,29 +12,31 @@
!PPJavaTokenParser methodsFor:'parsing'!
parseComments: anArray on: aStream
-
- | start comments |
- comments := anArray.
- [
- | peekTwice |
- [ aStream atEnd not and: [ aStream peek isSeparator ] ]
- whileTrue: [ aStream next ].
- peekTwice := aStream peekTwice.
- ((peekTwice first = $/) and:
- [ (peekTwice second = $*) or: [peekTwice second = $/]])] whileTrue: [
-"
- Transcript show: ('position ', aStream position asString, ' char ', aStream next asString); cr.
-"
- aStream next.
- start := aStream position.
- (aStream next = $*)
- ifTrue: [ aStream upToAll: '*/' ]
- ifFalse: [
- | position |
- position := aStream position.
- aStream upToAnyOf: CharacterSet crlf].
- comments := comments copyWith: (start to: aStream position) ].
- ^ comments
+
+ | start comments |
+ comments := anArray.
+ [
+ | peekTwice |
+ [ aStream atEnd not and: [ aStream peek isSeparator ] ]
+ whileTrue: [ aStream next ].
+ peekTwice := aStream peekTwice.
+ ((peekTwice first = $/) and:
+ [ (peekTwice second = $*) or: [peekTwice second = $/]])] whileTrue: [
+"
+ Transcript show: ('position ', aStream position asString, ' char ', aStream next asString); cr.
+"
+ aStream next.
+ start := aStream position.
+ (aStream next = $*)
+ ifTrue: [ aStream upToAll: '*/' ]
+ ifFalse: [
+ | position |
+ position := aStream position.
+ aStream upToAnyOf: (String with: (Character codePoint: 13) with: (Character codePoint: 10))].
+ comments := comments copyWith: (start to: aStream position) ].
+ ^ comments
+
+ "Modified: / 21-04-2015 / 17:23:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
parseOn: aPPContext