class: Scanner
authorClaus Gittinger <cg@exept.de>
Thu, 25 Sep 2014 16:12:18 +0200
changeset 3513 ec270f0832ea
parent 3512 1b57ac54b3b1
child 3514 51d1435bab3b
class: Scanner comment/format in: #test changed: #skipComment token-comment syntax slightly more restricted: token must be all lettersOrDigitsOrUnderline; so "<<Foo----" is NOT recognized as token comment
Scanner.st
--- a/Scanner.st	Tue Sep 23 22:28:52 2014 +0200
+++ b/Scanner.st	Thu Sep 25 16:12:18 2014 +0200
@@ -3474,6 +3474,7 @@
                     commentStream nextPutAll:'<<'
                 ].
                 hereChar := source nextPeek.
+
                 delimiter := String streamContents:[:s | self skipToEndOfLineRememberingIn:s].
                 delimiter := delimiter withoutSeparators.
                 delimiter isEmpty ifTrue:[
@@ -3482,7 +3483,8 @@
                 ((delimiter first isLetter or:[ delimiter first == $_ ])
                 and:[delimiter from:2 conform:[:ch | ch isLetterOrDigit]]) ifFalse:[
                     "/ treat as regular comment
-                    commentType := #regularComment
+                    commentType := #regularComment.
+                    source position:startPos.
                 ] ifTrue:[
                     hereChar == Character cr ifTrue:[
                         hereChar := source nextPeek.
@@ -3696,11 +3698,11 @@
 !Scanner class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/Scanner.st,v 1.321 2014-07-18 15:50:32 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/Scanner.st,v 1.322 2014-09-25 14:12:18 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libcomp/Scanner.st,v 1.321 2014-07-18 15:50:32 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/Scanner.st,v 1.322 2014-09-25 14:12:18 cg Exp $'
 ! !