edu.mit.sketch.ddlcompiler
Class RenameNode
java.lang.Object
|
+--edu.mit.sketch.ddlcompiler.RenameNode
- All Implemented Interfaces:
- ASTNode
- public class RenameNode
- extends Object
- implements ASTNode
Parsing can be thought of as generating and AST. This class
represents a rename node in such an AST.
RenameNode
public RenameNode(String type,
String new_id,
String renamed_id)
- Constructor
RenameNode
public RenameNode(String new_id,
String renamed_id,
ArrayList component_nodes)
- s
This constructor takes a list of ComponentNodes and
extracts the type information regarding the old
(renamed) identifier. The ComponentNodes should have
the correct type information.
toRenameStatement
public String toRenameStatement()
- The decleration string.
toDecleration
public String toDecleration()
- The decleration string.
toDeclerationAndRenameStatement
public String toDeclerationAndRenameStatement()
- The decleration and rename string.
toString
public String toString()
- The string representation.
- Specified by:
toString in interface ASTNode- Overrides:
toString in class Object