edu.vub.at.objects.grammar
Interface AssignField


 AssignField

The public interface to a field assignment AG element.

Example: o.x := 5 where x is a literal symbol

Author:
tvc

Method Summary
 Symbol fieldName()
          The field name must be a literal symbol Example: `{ o.x := 5}.statements[1].fieldName == `x
 Expression receiverExpression()
          The receiver expression may be any valid AmbientTalk expression.
 Expression valueExpression()
          The value expression may be any valid AmbientTalk expression.
 
Methods inherited from interface edu.vub.at.objects.AbstractGrammar
freeVariables
 
Methods inherited from interface edu.vub.at.objects.Object
super
 

Method Detail

receiverExpression

Expression receiverExpression()
The receiver expression may be any valid AmbientTalk expression. Example: `{ o.x := 5}.statements[1].receiverExpression == `o

Returns:
The expression for the object whose field is about to be assigned

fieldName

Symbol fieldName()
The field name must be a literal symbol Example: `{ o.x := 5}.statements[1].fieldName == `x

Returns:
The name of the field

valueExpression

Expression valueExpression()
The value expression may be any valid AmbientTalk expression. Example: `{ o.x := 5}.statements[1].valueExpression == `5

Returns:
The expression for the value that will be assigned to the field