coins.ast.expr
Class VariableExpr

java.lang.Object
  extended bycoins.ast.ASTree
      extended bycoins.ast.expr.VariableExpr
All Implemented Interfaces:
Expr, LvalueExpr, java.io.Serializable

public class VariableExpr
extends ASTree
implements LvalueExpr

Variable.

See Also:
Serialized Form

Constructor Summary
VariableExpr(Declarator d)
           
 
Method Summary
 void accept(Visitor v)
          Is a method for the visitor pattern.
 Declarator getDeclarator()
          Returns the declarator of the variable.
 ASTree getLeft()
          Returns null.
 ASTree getRight()
          Returns null.
 byte[] getType()
          Returns the type of the resulting value of evaluating the expression.
 boolean hasAddress()
          Returns true if the expression can be an operand of '&'.
 boolean isLvalue()
          Returns true if the expression is really an l-value.
 void setLeft(ASTree _left)
           
 void setRight(ASTree _right)
           
 java.lang.String toString()
           
 
Methods inherited from class coins.ast.ASTree
getTag, putSeparator, rightToString, toString1
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VariableExpr

public VariableExpr(Declarator d)
Method Detail

isLvalue

public boolean isLvalue()
Description copied from interface: LvalueExpr
Returns true if the expression is really an l-value.

Specified by:
isLvalue in interface LvalueExpr

hasAddress

public boolean hasAddress()
Description copied from interface: LvalueExpr
Returns true if the expression can be an operand of '&'.

Specified by:
hasAddress in interface LvalueExpr

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.

Specified by:
accept in class ASTree

getLeft

public ASTree getLeft()
Returns null.

Specified by:
getLeft in class ASTree

getRight

public ASTree getRight()
Returns null.

Specified by:
getRight in class ASTree

setLeft

public void setLeft(ASTree _left)
Specified by:
setLeft in class ASTree

setRight

public void setRight(ASTree _right)
Specified by:
setRight in class ASTree

getType

public byte[] getType()
Description copied from interface: Expr
Returns the type of the resulting value of evaluating the expression. See ast.TypeId

Specified by:
getType in interface Expr
Returns:
the encoded type.

getDeclarator

public Declarator getDeclarator()
Returns the declarator of the variable.


toString

public java.lang.String toString()
Overrides:
toString in class ASTree