edu.vub.at.objects.grammar
Interface AssignVariable


 AssignVariable

The public interface to a variable assignment AG element.

Example: x := 5

The left-hand side must be a literal symbol available in the lexical scope.

Author:
tvc

Method Summary
 Symbol name()
          The name of the variable must be a literal symbol Example: `{ x := 5}.statements[1].name == `x
 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

name

Symbol name()
The name of the variable must be a literal symbol Example: `{ x := 5}.statements[1].name == `x

Returns:
The name of the variable

valueExpression

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

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