slogo.instruction
Class To

java.lang.Object
  extended by slogo.language.GrammarElement
      extended by slogo.instruction.Instruction
          extended by slogo.instruction.To

public class To
extends Instruction

Defines a turtle subroutine by placing it in the subroutine factory map.

Author:
tshishikub

Field Summary
private  java.lang.String myId
           
private  StrictInstructionList mySIL
           
 
Fields inherited from class slogo.language.GrammarElement
gelementsToValue
 
Constructor Summary
To(IdentifierToken i, StrictInstructionList sil)
           
To(java.lang.String name, StrictInstructionList sil)
           
 
Method Summary
 java.lang.Object evaluate(Context c)
          Evaluate this language construct in some context.
 java.lang.String toString()
           
 
Methods inherited from class slogo.instruction.Instruction
evaluateNumericExpression
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

myId

private java.lang.String myId

mySIL

private StrictInstructionList mySIL
Constructor Detail

To

public To(java.lang.String name,
          StrictInstructionList sil)

To

public To(IdentifierToken i,
          StrictInstructionList sil)
Method Detail

evaluate

public java.lang.Object evaluate(Context c)
Description copied from class: GrammarElement
Evaluate this language construct in some context. The evaluation may have side-effects, e.g., moving a turtle.

Overrides:
evaluate in class Instruction
Parameters:
c - context in which the evaluation takes place
Returns:
the result of evaluating the construct

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object