Scanner.st
changeset 785 14d0ec37a754
parent 783 611d7b234115
child 793 3ee3ebe0145e
--- a/Scanner.st	Thu Oct 01 15:21:33 1998 +0200
+++ b/Scanner.st	Sat Oct 17 16:50:17 1998 +0200
@@ -16,10 +16,10 @@
 		requestor exitBlock errorFlag ignoreErrors ignoreWarnings
 		saveComments currentComments collectedSource
 		allowUnderscoreInIdentifier allowDollarInIdentifier
-		warnSTXSpecialComment warnUnderscoreInIdentifier
-		warnOldStyleAssignment warnCommonMistakes outStream outCol
-		warnSTXNameSpaceUse warnPossibleIncompatibilities
-		warnDollarInIdentifier'
+		scanColonAsKeyword warnSTXSpecialComment
+		warnUnderscoreInIdentifier warnOldStyleAssignment
+		warnCommonMistakes outStream outCol warnSTXNameSpaceUse
+		warnPossibleIncompatibilities warnDollarInIdentifier'
 	classVariableNames:'TypeArray ActionArray AllowUnderscoreInIdentifier Warnings
 		WarnSTXSpecials WarnOldStyleAssignment WarnUnderscoreInIdentifier
 		WarnCommonMistakes WarnPossibleIncompatibilities
@@ -985,6 +985,7 @@
 
     allowUnderscoreInIdentifier := AllowUnderscoreInIdentifier.
     allowDollarInIdentifier := AllowDollarInIdentifier.
+    scanColonAsKeyword := true.
 
     ActionArray isNil ifTrue:[
         self class setupActions
@@ -992,7 +993,7 @@
     actionArray := ActionArray.
     typeArray := TypeArray.
 
-    "Modified: 7.9.1997 / 01:51:01 / cg"
+    "Modified: / 17.10.1998 / 15:48:06 / cg"
 !
 
 initializeFor:aStringOrStream
@@ -1362,7 +1363,7 @@
         ].
     ].
 
-    (nextChar == $:) ifTrue:[
+    (nextChar == $: and:[scanColonAsKeyword]) ifTrue:[
         source next.
         (source peekOrNil == $=) ifFalse:[
             (source peekOrNil == $:) ifFalse:[
@@ -1392,7 +1393,7 @@
     ^ tokenType
 
     "Created: / 13.9.1995 / 12:56:42 / claus"
-    "Modified: / 13.5.1998 / 14:58:39 / cg"
+    "Modified: / 17.10.1998 / 15:48:28 / cg"
 !
 
 nextMantissa:radix
@@ -1880,6 +1881,6 @@
 !Scanner class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/Scanner.st,v 1.86 1998-10-01 10:55:16 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/Scanner.st,v 1.87 1998-10-17 14:50:17 cg Exp $'
 ! !
 Scanner initialize!