Tea Java Runtime API
Version 3.1.0

com.pdmfc.tea.compiler
Class SCode

java.lang.Object
  |
  +--com.pdmfc.tea.compiler.SCode

public class SCode
extends java.lang.Object

A Tea program that can be executed in a given context. A Tea program is just a sequence of Tea statements.


Method Summary
 java.lang.Object exec(SContext context)
          Executes the sequence of Tea statements in the context given as argument.
 void prettyPrint(java.io.PrintStream out, int indent)
          This is used for debugging.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

exec

public final java.lang.Object exec(SContext context)
                            throws STeaException
Executes the sequence of Tea statements in the context given as argument.
Parameters:
context - Context inside wich the block will be executed.
Returns:
The value returned by the last command in the block or null if it is an empty block.
Throws:
STeaException - Only thrown by the execution of one of the statements.

prettyPrint

public final void prettyPrint(java.io.PrintStream out,
                              int indent)
This is used for debugging. At the moment it is rather slow.
Parameters:
out - A stream where the message will be sent to.
ident - Number of padding white spaces inserted into the left.

Tea Java Runtime API
Version 3.1.0

© 2002 PDM&FC, All Rights Reserved.