edu.mit.ai.psg.jeva
Class JNSLocalVariableDeclaration

java.lang.Object
  |
  +--edu.mit.ai.psg.jeva.SimpleNode
        |
        +--edu.mit.ai.psg.jeva.JevaNode
              |
              +--edu.mit.ai.psg.jeva.JNSLocalVariableDeclaration

public class JNSLocalVariableDeclaration
extends JevaNode
implements IStatementNode, JevaParserConstants

Jeva parse Node for local variable declarations, e.g., "int i = 0;". Can contain multiple declarations, e.g., "int i=0, j=1, k=2;".

Author:
CarlManning, caroma@ai.mit.edu
Copyright (c) 1997, 1998, 1999 Massachusetts Institute of Technology

Fields inherited from class edu.mit.ai.psg.jeva.SimpleNode
children, id, parent
 
Method Summary
 IEnv eval(IEnv env)
           
 JNSVariableDeclarator getDeclaratorNode(int i)
           
 int getNumDeclarators()
           
 JNType getTypeNode()
           
 Object jjtAccept(IJevaVisitor visitor, Object data)
           
 IEnv verifyTypes(IEnv env)
          Extend environment so types of later expressions can be calculated.
 
Methods inherited from class edu.mit.ai.psg.jeva.JevaNode
checkInsertionPoint, find2ndTokenBeforeEndBody, findChildIndex, findPrecedingToken, findTokenBeforeChild, findTokenBeforeChild, findTokenBeforeEnd, getBeginToken, getEndToken, insertChildTokens, insertNewChildAfter, insertNewChildAt, insertNewChildBefore, jnGetChild, jnGetParent, print, print, printToken, printToString, printToString, removeChild, removeChildTokens, replaceChild, replaceChild, setBeginToken, setEndToken, updateEndTokens, updateEndTokensPriorChild, updateEndTokensPriorNode, updateEndTokensPriorNode
 
Methods inherited from class edu.mit.ai.psg.jeva.SimpleNode
dump, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

jjtAccept

public Object jjtAccept(IJevaVisitor visitor,
                        Object data)
Overrides:
jjtAccept in class JevaNode

getTypeNode

public JNType getTypeNode()

getNumDeclarators

public int getNumDeclarators()

getDeclaratorNode

public JNSVariableDeclarator getDeclaratorNode(int i)

verifyTypes

public IEnv verifyTypes(IEnv env)
                 throws VerifyingException
Extend environment so types of later expressions can be calculated. Don't evaluate var initializers, which may have side effects.
Specified by:
verifyTypes in interface IStatementNode

eval

public IEnv eval(IEnv env)
          throws ThrowException
Specified by:
eval in interface IStatementNode

Copyright (c) 1996-1999
Massachusetts Institute of Technology

Feedback: jeva-bugs@ai.mit.edu