avrora.core.isdl.ast
Class CallStmt

java.lang.Object
  extended byavrora.core.isdl.ast.Stmt
      extended byavrora.core.isdl.ast.CallStmt

public class CallStmt
extends Stmt

The CallStmt class represents a call to a subroutine that does not produce a value.


Field Summary
 java.util.List args
          The args fields stores a reference to a list of expressions that are evaluated and passed as arguments to the subroutine.
 Token method
          The method field stores a string that represents the name of the subroutine being called.
 
Constructor Summary
CallStmt(java.lang.String m, java.util.List a)
          The constructor of the CallStmt class simply initializes the references to the subroutine name and arguments.
CallStmt(Token m, java.util.List a)
          The constructor of the CallStmt class simply initializes the references to the subroutine name and arguments.
 
Method Summary
 Stmt accept(StmtRebuilder r, java.lang.Object env)
          The accept() method implements one half of the visitor pattern for visiting the abstract syntax trees representing the code of a particular instruction or subroutine.
 void accept(StmtVisitor v)
          The accept() method implements one half of the visitor pattern for visiting the abstract syntax trees representing the code of a particular instruction or subroutine.
 java.lang.String toString()
          The toString() method recursively converts this statement to a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

method

public final Token method
The method field stores a string that represents the name of the subroutine being called.


args

public final java.util.List args
The args fields stores a reference to a list of expressions that are evaluated and passed as arguments to the subroutine.

Constructor Detail

CallStmt

public CallStmt(Token m,
                java.util.List a)
The constructor of the CallStmt class simply initializes the references to the subroutine name and arguments.

Parameters:
m - the name of the subroutine as a string
a - list of expressions representing the arguments to the subroutine

CallStmt

public CallStmt(java.lang.String m,
                java.util.List a)
The constructor of the CallStmt class simply initializes the references to the subroutine name and arguments.

Parameters:
m - the name of the subroutine as a string
a - list of expressions representing the arguments to the subroutine
Method Detail

accept

public void accept(StmtVisitor v)
The accept() method implements one half of the visitor pattern for visiting the abstract syntax trees representing the code of a particular instruction or subroutine.

Specified by:
accept in class Stmt
Parameters:
v - the visitor to accept

toString

public java.lang.String toString()
The toString() method recursively converts this statement to a string.

Returns:
a string representation of this statement

accept

public Stmt accept(StmtRebuilder r,
                   java.lang.Object env)
The accept() method implements one half of the visitor pattern for visiting the abstract syntax trees representing the code of a particular instruction or subroutine. The StmtRebuilder interface allows visitors to rearrange and rebuild the statements.

Specified by:
accept in class Stmt
Parameters:
r - the visitor to accept
Returns:
the result of calling the appropriate visit() of the rebuilder passed