Review Board

1.0

Map true and false to 1 and 0 in the Smalltalk parser.

Updated 1 year, 9 months ago

Truls Becken Reviewers
EtoileCore
None Etoile trunk (etoile/trunk/Etoile)
Simple mapping to numbers when true and false are referenced.

 
Ship it!
Posted 1 year, 9 months ago (December 7th, 2008, 9:49 a.m.)
Looks okay.  Someone with more knowledge of Smalltalk should say if 'true' and 'false' are the right identifiers to use here.
Posted 1 year, 9 months ago (December 7th, 2008, 12:58 p.m.)

   

  
Languages/SmalltalkKit/smalltalk.y (Diff revision 1)
 
Looks correct to me.

It's certainly not the fastest implementation, but I'd postpone optimisations for the sake of clarity.

Would it have been possible to just add the values for true and false to LanguageKit's ObjCConstants.plist file? Otherwise, ship it!
  1. It would be possible to use ObjCConstants, but then you would have to write '@true' and not just 'true'.
    
    Unless the symbol table code could check ObjCConstants. Then we could get rid of the special syntax for constants all together.
    Does that sound like something worth doing?
  2. I understand. No, this doesn't sound like it's worth doing at the moment. :-)
Ship it!
Posted 1 year, 9 months ago (December 7th, 2008, 2:57 p.m.)