The Trunk: Compiler-nice.119.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Compiler-nice.119.mcz

commits-2
Nicolas Cellier uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-nice.119.mcz

==================== Summary ====================

Name: Compiler-nice.119
Author: nice
Time: 23 February 2010, 2:44:50.52 pm
UUID: 88476d19-0098-e244-9ed8-14b04fe84dac
Ancestors: Compiler-ar.118

1) Connect Number class>>#readSqueakSyntaxFrom:
2) remove a now useless fixTemps

=============== Diff against Compiler-ar.118 ===============

Item was changed:
  ----- Method: Scanner>>xDigit (in category 'multi-character scans') -----
  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 := [Number readSqueakSyntaxFrom: source] ifError: [:err :rcvr | self offEnd: err].
- token := [Number readFrom: source] ifError: [:err :rcvr | self offEnd: err].
  self step; step!

Item was changed:
  ----- Method: UndeclaredVariable>>openMenuIn: (in category 'as yet unclassified') -----
  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]].
- actions add: [parser substituteVariable: each atInterval: interval] fixTemps].
  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])!