edu.mit.ai.psg.jevaES
Class JNSLocalVariableDeclaration
java.lang.Object
|
+--edu.mit.ai.psg.jevaES.SimpleNode
|
+--edu.mit.ai.psg.jevaES.JevaNode
|
+--edu.mit.ai.psg.jevaES.JNSLocalVariableDeclaration
- public class JNSLocalVariableDeclaration
- extends JevaNode
- implements IStatementNode, JevaESParserConstants
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 Massachusetts Institute of Technology
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