theodore-norvell / PLAAY

Senior Design Project PLAAY (Programming Language for Adults And Youth)
2 stars 0 forks source link

Change function calls to work with tuples. #157

Open theodore-norvell opened 6 years ago

theodore-norvell commented 6 years ago

In the semantics of Plaay a call like this Call( f, e0, e1, e2 ) must be treated exactly as a call Call( f, Tuple( e0, e1, e2) ) and a call Call( f ) must be treated the same as a call Call( f, Tuple() )

Currently there is a stage in processing arguments where the argument values are formed into an array. In this step, if there is one argument and it is a tuple, we should instead make an array out of it's components.

In calling closures, when there is 1 parameter and the number of arguments is not 1, we need to gather make a tuple our of the arguments and use that tuple to initialize the parameter.

ajavij commented 6 years ago

This is done. Please review the changes.