edu.vub.at.objects.grammar
Interface ClosureLiteral


 ClosureLiteral

The public interface to a closure literal AG element. Example: { |a, b| a + b } where |a, b| represents the formal arguments list. If there are no formal arguments, the vertical bars may be omitted. The body may not be empty.

Author:
tvc

Method Summary
 Table arguments()
          A literal closure may contain zero, one or more formal arguments.
 Begin bodyExpression()
          The body of a literal closure may not be empty.
 
Methods inherited from interface edu.vub.at.objects.AbstractGrammar
freeVariables
 
Methods inherited from interface edu.vub.at.objects.Object
super
 

Method Detail

arguments

Table arguments()
A literal closure may contain zero, one or more formal arguments. Splicing is allowed in the argument list. Example: `({ |a, b| a + b }).arguments == `[a, b]

Returns:
The formal argument list

bodyExpression

Begin bodyExpression()
The body of a literal closure may not be empty. Example: `({ |a, b| a + b }).bodyExpression == `(a.+(b))

Returns:
The body of the literal closure