--- a/Scanner.st Tue Dec 01 11:22:05 2009 +0100
+++ b/Scanner.st Tue Dec 01 21:02:28 2009 +0100
@@ -2040,6 +2040,10 @@
charType := typeArray at:code.
^ (charType == #special)
or:[ (charType == #extendedSpecial) and:[parserFlags allowExtendedBinarySelectors] ]
+
+ "
+ self basicNew isSpecialOrExtendedSpecialCharacter:$-
+ "
!
notifying:anObject
@@ -2698,23 +2702,23 @@
].
secondChar notNil ifTrue:[
+ (secondChar == $-) ifTrue:[
+ "special- look if minus belongs to number following"
+ p := source position1Based.
+ source next.
+ thirdChar := source peekOrNil.
+ source position1Based:p.
+ (thirdChar notNil and:[thirdChar isDigit]) ifTrue:[
+ tokenName := token := string.
+ tokenType := #BinaryOperator.
+ self
+ warnPossibleIncompatibility:'add a space before ''-'' for compatibility with other ST systems'
+ position:p
+ to:p.
+ ^ tokenType
+ ]
+ ].
(self isSpecialOrExtendedSpecialCharacter:secondChar) ifTrue:[
- (secondChar == $-) ifTrue:[
- "special- look if minus belongs to number following"
- p := source position1Based.
- source next.
- thirdChar := source peekOrNil.
- source position1Based:p.
- (thirdChar notNil and:[thirdChar isDigit]) ifTrue:[
- tokenName := token := string.
- tokenType := #BinaryOperator.
- self
- warnPossibleIncompatibility:'add a space before ''-'' for compatibility with other ST systems'
- position:p
- to:p.
- ^ tokenType
- ]
- ].
source next.
string := string copyWith:secondChar.
@@ -3270,7 +3274,11 @@
!Scanner class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libcomp/Scanner.st,v 1.251 2009-09-15 12:13:44 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libcomp/Scanner.st,v 1.252 2009-12-01 20:02:28 cg Exp $'
+!
+
+version_CVS
+ ^ '$Header: /cvs/stx/stx/libcomp/Scanner.st,v 1.252 2009-12-01 20:02:28 cg Exp $'
! !
Scanner initialize!