edu.vub.at.objects.grammar
Interface DefField


 DefField

The public interface to a field definition AG element.

Example: def x := 5 where x is a literal symbol

Author:
tvcutsem

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

Returns:
the name of the field

valueExpression

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

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