org.concord.util.script
Class ReturnStatement

java.lang.Object
  |
  +--org.concord.util.script.ScriptObject
        |
        +--org.concord.util.script.Statement
              |
              +--org.concord.util.script.ReturnStatement
All Implemented Interfaces:
java.beans.BeanInfo

public class ReturnStatement
extends Statement

The ReturnStatement class implements the node that supports the semantics of the "return" statement. The retun statement, when used inside a method, causes the method to terminate and return a value; The return statement works just like a "return" statement in the C language. The finish works in this semantic engine by settig a result value and setting a flag in the current stack frame. It is up to the enclosing semantic nodes to determine if they should implement return semantics at their level of scope.

Version:
$Revision: 1.1.1.1 $ $Date: 2001/04/28 00:39:31 $
Author:
$Author: ed $

Field Summary
protected  Expression expression
           
 
Fields inherited from class org.concord.util.script.Statement
empty
 
Fields inherited from class org.concord.util.script.ScriptObject
beginColumn, beginLine, debug, deleted, doConversion, endColumn, endLine, name, nil, runtimeTable, script
 
Fields inherited from interface java.beans.BeanInfo
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32
 
Constructor Summary
ReturnStatement()
           
 
Method Summary
 void delete()
           
 void interpret()
          This does nothing.
 void setExpression(Expression expr)
           
 
Methods inherited from class org.concord.util.script.Statement
getLocals
 
Methods inherited from class org.concord.util.script.ScriptObject
findConstructor, findMethod, getAdditionalBeanInfo, getArrayValue, getAtom, getBeanDescriptor, getCurrentFrame, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getField, getFieldValue, getIcon, getMethodDescriptors, getName, getPropertyDescriptors, getScript, popFrame, pushFrame, setArrayValue, setCurrentFrame, setFieldValue, setName, setScript, setSourceBounds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

expression

protected Expression expression
Constructor Detail

ReturnStatement

public ReturnStatement()
Method Detail

delete

public void delete()
Overrides:
delete in class ScriptObject

setExpression

public void setExpression(Expression expr)

interpret

public void interpret()
Description copied from class: ScriptObject
This does nothing. Maybe should be abstract?
Overrides:
interpret in class Statement