ant.compiler.ast
Class Tree.Block

java.lang.Object
  extended byant.compiler.ast.Tree
      extended byant.compiler.ast.Tree.Block
Enclosing class:
Tree

public static class Tree.Block
extends Tree

Tree node representing {...} statements.

License: GPL

Author:
Bernhard Haumacher

Nested Class Summary
 
Nested classes inherited from class ant.compiler.ast.Tree
Tree.AndExpression, Tree.Assign, Tree.BinaryExpression, Tree.Block, Tree.Call, Tree.ConditionTest, Tree.Const, Tree.DropCommand, Tree.Expression, Tree.FoodTest, Tree.Goto, Tree.If, Tree.Label, Tree.MarkCommand, Tree.MoveCommand, Tree.NotExpression, Tree.OrExpression, Tree.PickUpCommand, Tree.Proc, Tree.RandomTest, Tree.Set, Tree.Test, Tree.TurnCommand, Tree.UnmarkCommand, Tree.Var, Tree.Visitor, Tree.WallTest
 
Field Summary
private  java.util.ArrayList localVars
           
 Tree[] stmts
           
 
Fields inherited from class ant.compiler.ast.Tree
parent
 
Constructor Summary
Tree.Block(Tree[] stmts)
           
 
Method Summary
 void addLocalVariable(Tree.Var var)
           
 void clearLocalVariables()
           
 Tree.Var getLocalVariable(int index)
           
 int getLocalVariableCnt()
           
 int getLocalVariableIndex(Tree.Var var)
           
 void visit(Tree.Visitor v)
           
 
Methods inherited from class ant.compiler.ast.Tree
enclosingBlock, isChildOf, newNopStatement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stmts

public Tree[] stmts

localVars

private java.util.ArrayList localVars
Constructor Detail

Tree.Block

public Tree.Block(Tree[] stmts)
Method Detail

addLocalVariable

public void addLocalVariable(Tree.Var var)

getLocalVariableIndex

public int getLocalVariableIndex(Tree.Var var)

getLocalVariableCnt

public int getLocalVariableCnt()

getLocalVariable

public Tree.Var getLocalVariable(int index)

clearLocalVariables

public void clearLocalVariables()

visit

public void visit(Tree.Visitor v)
Specified by:
visit in class Tree