coins.ast.stmnt
Class CompoundStmnt

java.lang.Object
  extended bycoins.ast.ASTree
      extended bycoins.ast.ASTList
          extended bycoins.ast.stmnt.CompoundStmnt
All Implemented Interfaces:
java.io.Serializable, Stmnt

public class CompoundStmnt
extends ASTList
implements Stmnt

A linked-list of statements.

See Also:
Serialized Form

Constructor Summary
CompoundStmnt(Stmnt s)
           
CompoundStmnt(Stmnt s, CompoundStmnt rest)
           
 
Method Summary
 void accept(Visitor v)
          Is a method for the visitor pattern.
static CompoundStmnt append(CompoundStmnt block, Stmnt s)
           
static CompoundStmnt concat(CompoundStmnt block1, CompoundStmnt block2)
           
 java.lang.String fileName()
          Returns the file name including the statement.
 Stmnt get()
          Returns the first element of the list.
protected  java.lang.String getTag()
          Returns the type of this node.
 int lineNumber()
          Returns the line number of the statement.
 CompoundStmnt next()
          Returns the cdr part of the list.
protected  void putSeparator(java.lang.StringBuffer sbuf)
           
 Stmnt simplify()
           
 
Methods inherited from class coins.ast.ASTList
append, concat, getLeft, getRight, head, rightToString, setHead, setLeft, setRight, setTail, subst, tail
 
Methods inherited from class coins.ast.ASTree
toString, toString1
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompoundStmnt

public CompoundStmnt(Stmnt s)

CompoundStmnt

public CompoundStmnt(Stmnt s,
                     CompoundStmnt rest)
Method Detail

getTag

protected java.lang.String getTag()
Description copied from class: ASTree
Returns the type of this node. This method is used by toString().

Overrides:
getTag in class ASTList

get

public Stmnt get()
Returns the first element of the list.


next

public CompoundStmnt next()
Returns the cdr part of the list.


simplify

public Stmnt simplify()

fileName

public java.lang.String fileName()
Description copied from interface: Stmnt
Returns the file name including the statement.

Specified by:
fileName in interface Stmnt

lineNumber

public int lineNumber()
Description copied from interface: Stmnt
Returns the line number of the statement.

Specified by:
lineNumber in interface Stmnt

putSeparator

protected void putSeparator(java.lang.StringBuffer sbuf)
Overrides:
putSeparator in class ASTree

append

public static CompoundStmnt append(CompoundStmnt block,
                                   Stmnt s)

concat

public static CompoundStmnt concat(CompoundStmnt block1,
                                   CompoundStmnt block2)

accept

public void accept(Visitor v)
Description copied from class: ASTree
Is a method for the visitor pattern. It calls atXXX() on the given visitor, where XXX is the class name of the node object.

Overrides:
accept in class ASTList