Class method

java.lang.Object
  extended by TreeNode
      extended by Feature
          extended by method

 class method
extends Feature

Defines AST constructor 'method'.

See TreeNode for full documentation.


Field Summary
protected  Expression expr
           
protected  Formals formals
           
protected  AbstractSymbol name
           
protected  AbstractSymbol return_type
           
 
Fields inherited from class TreeNode
lineNumber
 
Constructor Summary
method(int lineNumber, AbstractSymbol a1, Formals a2, AbstractSymbol a3, Expression a4)
          Creates "method" AST node.
 
Method Summary
 TreeNode copy()
          Creates a copy of this node.
 void dump_with_types(java.io.PrintStream out, int n)
           
 void dump(java.io.PrintStream out, int n)
          Pretty-prints this node to this output stream.
 
Methods inherited from class TreeNode
copy_AbstractSymbol, copy_Boolean, dump_AbstractSymbol, dump_Boolean, dump_line, getLineNumber, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected AbstractSymbol name

formals

protected Formals formals

return_type

protected AbstractSymbol return_type

expr

protected Expression expr
Constructor Detail

method

public method(int lineNumber,
              AbstractSymbol a1,
              Formals a2,
              AbstractSymbol a3,
              Expression a4)
Creates "method" AST node.

Parameters:
lineNumber - the line in the source file from which this node came.
a1 - initial value for name
a2 - initial value for formals
a3 - initial value for return_type
a4 - initial value for expr
Method Detail

copy

public TreeNode copy()
Description copied from class: TreeNode
Creates a copy of this node.

Specified by:
copy in class TreeNode
Returns:
a copy of this node

dump

public void dump(java.io.PrintStream out,
                 int n)
Description copied from class: TreeNode
Pretty-prints this node to this output stream.

Specified by:
dump in class TreeNode
Parameters:
out - the output stream
n - the number of spaces to indent the output

dump_with_types

public void dump_with_types(java.io.PrintStream out,
                            int n)
Specified by:
dump_with_types in class Feature