the magic behind "do it"
Brent Vukmer
bvukmer at blackboard.com
Thu Dec 27 15:26:34 UTC 2001
Selecting "2 halt" and inspecting brought me to the method Compiler#evalute:in:to:notifying:ifFail. I wrote a script to
access this method directly ( see below ). I am getting nil instead of 3. When I debugged, it looks like the Parser is generating the following MethodNode:
DoIt
^ nil
What do I need to do to get Compiler-love?
| exprStream result failBlock |
exprStream _ ReadWriteStream on: ''.
exprStream nextPutAll: '1 + 2'.
failBlock _ [ Transcript show: 'ArithmeticExpression#eval FAILED: ', exprStream contents. ].
result _ Compiler new evaluate: exprStream in: nil to: nil notifying: nil ifFail: failBlock.
^ result
More information about the Squeak-dev
mailing list
|