edu.vub.at.objects.grammar
Interface MultiAssignment


 MultiAssignment

The interface to a multi-assignment AG element.

Example: [ x, y ] := [ y, x ]

By using splicing in the left-hand expression, this can be used to split up tables: [x, @y] := [1, 2, 3, 4]

Author:
tvc

Method Summary
 Table parameters()
          The left-hand side of the assignment must be a literal table.
 Expression valueExpression()
          The right-hand side of the assignment may be any valid AmbientTalk expression that evaluates to a native table Example: `{ [ x, y ] := [ y, x ] }.statements[1].valueExpression == `[y, x]
 
Methods inherited from interface edu.vub.at.objects.AbstractGrammar
freeVariables
 
Methods inherited from interface edu.vub.at.objects.Object
super
 

Method Detail

parameters

Table parameters()
The left-hand side of the assignment must be a literal table. Slicing is allowed at the end. Example: `{ [ x, y ] := [ y, x ] }.statements[1].parameters == `[x, y]

Returns:
a table with valid left-expressions

valueExpression

Expression valueExpression()
The right-hand side of the assignment may be any valid AmbientTalk expression that evaluates to a native table Example: `{ [ x, y ] := [ y, x ] }.statements[1].valueExpression == `[y, x]

Returns:
the value expression