'From Squeak3.11alpha of 13 February 2010 [latest update: #9483] on 9 March 2010 at 11:11:23 am'! !Scanner methodsFor: 'multi-character scans' stamp: 'nice 2/25/2010 02:43'! xDigit "Form a number." tokenType := #number. (aheadChar = 30 asCharacter and: [source atEnd and: [source skip: -1. source next ~= 30 asCharacter]]) ifTrue: [source skip: -1 "Read off the end last time"] ifFalse: [source skip: -2]. token := (SqNumberParser on: source) failBlock: [:errorString :position | self notify: errorString at:position]; nextNumber. self step; step! ! !UndeclaredVariable methodsFor: 'as yet unclassified' stamp: 'nice 2/9/2010 15:17'! openMenuIn: aBlock | alternatives labels actions lines caption choice | alternatives := parser possibleVariablesFor: name. labels := OrderedCollection new. actions := OrderedCollection new. lines := OrderedCollection new. name first isLowercase ifTrue: [labels add: 'declare temp'. actions add: [parser declareTempAndPaste: name]. labels add: 'declare instance'. actions add: [parser declareInstVar: name]] ifFalse: [labels add: 'define new class'. actions add: [parser defineClass: name]. labels add: 'declare global'. actions add: [parser declareGlobal: name]. parser canDeclareClassVariable ifTrue: [labels add: 'declare class variable'. actions add: [parser declareClassVar: name]]]. lines add: labels size. alternatives do: [:each | labels add: each. actions add: [parser substituteVariable: each atInterval: interval]]. lines add: labels size. labels add: 'cancel'. caption := 'Unknown variable: ' , name , ' please correct, or cancel:'. choice := aBlock value: labels value: lines value: caption. self resume: (actions at: choice ifAbsent: [nil])! !