*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Tue, 16 Dec 2008 13:39:14 +0100
changeset 2138 330345945d40
parent 2137 a291219a1bd7
child 2139 ff81d8aadd3f
*** empty log message ***
Scanner.st
--- a/Scanner.st	Tue Nov 11 21:45:23 2008 +0100
+++ b/Scanner.st	Tue Dec 16 13:39:14 2008 +0100
@@ -2986,21 +2986,12 @@
       change it without notice)"
 
     (hereChar == $/ and:[parserFlags allowSTXEOLComments]) ifTrue:[
-        commentType := #eolComment.
-
         hereChar := source nextPeek.
-        [hereChar notNil and:[hereChar ~~ Character cr]] whileTrue:[
-            commentStream notNil ifTrue:[
-                commentStream nextPut:hereChar
-            ].
-            outStream notNil ifTrue:[
-                outStream nextPut:hereChar.
-                outCol := outCol + 1
-            ].
-            hereChar := source nextPeek.
-        ].
+
+        self skipToEndOfLineRememberingIn:commentStream.
         endPos := source position1Based.
         self markCommentFrom:startPos to:endPos.
+        commentType := #eolComment.
         lineNr := lineNr + 1.
         self warnSTXSpecialCommentAt:startPos to:endPos.
         outStream notNil ifTrue:[
@@ -3076,6 +3067,19 @@
     ].
 
     "Modified: / 31.3.1998 / 23:45:26 / cg"
+!
+
+skipToEndOfLineRememberingIn:commentStreamOrNil
+    [hereChar notNil and:[hereChar ~~ Character cr]] whileTrue:[
+        commentStreamOrNil notNil ifTrue:[
+            commentStreamOrNil nextPut:hereChar
+        ].
+        outStream notNil ifTrue:[
+            outStream nextPut:hereChar.
+            outCol := outCol + 1
+        ].
+        hereChar := source nextPeek.
+    ].
 ! !
 
 !Scanner::Comment methodsFor:'accessing'!
@@ -3178,7 +3182,7 @@
 !Scanner class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/Scanner.st,v 1.239 2008-11-10 17:02:51 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/Scanner.st,v 1.240 2008-12-16 12:39:14 cg Exp $'
 ! !
 
 Scanner initialize!