'From Squeak3.2gamma of 15 January 2002 [latest update: #4811] on 18 June 2002 at 12:07:18 am'! !Scanner methodsFor: 'multi-character scans' stamp: 'ka 6/18/2002 00:03'! xLetter "Form a word or keyword." | type c | buffer reset. [c _ hereChar asciiValue. (type _ typeTable at: c ifAbsent: [#xLetter]) == #xLetter or: [type == #xDigit]] whileTrue: ["open code step for speed" buffer nextPut: hereChar. hereChar _ aheadChar. source atEnd ifTrue: [aheadChar _ 30 asCharacter "doit"] ifFalse: [aheadChar _ source next]]. (type == #colon or: [type == #xColon and: [aheadChar ~= $=]]) ifTrue: [buffer nextPut: self step. ["Allow any number of embedded colons in literal symbols" (typeTable at: hereChar asciiValue ifAbsent: [#xLetter]) == #xColon] whileTrue: [buffer nextPut: self step]. tokenType _ #keyword] ifFalse: [tokenType _ #word]. token _ buffer contents. token isAsciiString ifTrue: [token _ token asAsciiString]! !