com.go.tea.parsetree
Class AssignmentStatement

java.lang.Object
  |
  +--com.go.tea.parsetree.Node
        |
        +--com.go.tea.parsetree.Statement
              |
              +--com.go.tea.parsetree.AssignmentStatement
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class AssignmentStatement
extends Statement

AssignmentStatements can only assign values to variables, and not to array elements. AssignmentStatements are not expressions as they are in C or Java, and thus chaining is not allowed. i.e. a = b = c;

Version:
23 , 9/07/00
Author:
Brian S O'Neill
See Also:
Serialized Form

Constructor Summary
AssignmentStatement(SourceInfo info, VariableRef lvalue, Expression rvalue)
           
 
Method Summary
 java.lang.Object accept(NodeVisitor visitor)
          Every subclass of Node must override this method with the following: return visitor.visit(this).
 java.lang.Object clone()
          Returns a clone of this Node and all its children.
 VariableRef getLValue()
           
 Expression getRValue()
           
 void setRValue(Expression rvalue)
           
 
Methods inherited from class com.go.tea.parsetree.Statement
isBreak, isReturn
 
Methods inherited from class com.go.tea.parsetree.Node
getSourceInfo, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AssignmentStatement

public AssignmentStatement(SourceInfo info,
                           VariableRef lvalue,
                           Expression rvalue)
Method Detail

accept

public java.lang.Object accept(NodeVisitor visitor)
Description copied from class: Node
Every subclass of Node must override this method with the following: return visitor.visit(this).
Overrides:
accept in class Statement
Following copied from class: com.go.tea.parsetree.Node
Parameters:
visitor - A visitor of this Node
Returns:
Node The Node returned by the visitor
See Also:
NodeVisitor

clone

public java.lang.Object clone()
Description copied from class: Node
Returns a clone of this Node and all its children. Immutable child objects are not necessarily cloned
Overrides:
clone in class Node

getLValue

public VariableRef getLValue()

getRValue

public Expression getRValue()

setRValue

public void setRValue(Expression rvalue)