[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]

removal of translator hack

I fixed up the self proclaimed translator hack which allowed for the
invokation of superclass constructors (base class initializers) using the
: (argument) notation.
  I fixed this in two ways. First, I added the base class name to help
human recognition, and I also allow for the initialization of member
variables with the : variableName (expr) notation.
  Now, the following smalltalk

create: baseMember with: localConstMember with: localReferenceMember
   super create: baseMember.
   localConstMemberInternal := localConstMember.
   localReferenceMemberInternal := localReferenceMember.

is translated to:

Classname::Classname (...arguments...)
 : Baseclass (baseMember),
   localConstMemberInternal (localConstMember),
   localReferenceMemberInternal (localReferenceMember) {

  I even think I did this in a fashion which you might approve :-}
returnType is no longer used for this, instead, I pull out the statements
that are going to be converted and store them in a collection (in an
instance variable of MethodNode).  Later, the collection is passed to
printConstructorPattern, which uses the statements to create the proper
  I think I'm getting the hang of this Translator thing! :->