VariableDeclarationNodeIF.java
package edu.udel.cis.vsl.tass.ast.IF.declaration;
import edu.udel.cis.vsl.tass.ast.IF.ASTNodeIF;
import edu.udel.cis.vsl.tass.ast.IF.IdentifierNodeIF;
import edu.udel.cis.vsl.tass.ast.IF.expression.ExpressionNodeIF;
import edu.udel.cis.vsl.tass.ast.IF.type.TypeNodeIF;
/**
* A variable declaration.
*/
public interface VariableDeclarationNodeIF extends ASTNodeIF {
public enum StorageClass {
EXTERNAL, AUTO, STATIC, REGISTER
};
/** Whether the variable includes the const type qualifier */
public boolean isConst();
/** Whether the variable includes the volatile type qualifier */
public boolean isVolatile();
/** Whether the variable includes the restrict type qualifier */
public boolean isRestrict();
/** The variable name. */
IdentifierNodeIF identifier();
/** The type of the variable. */
TypeNodeIF type();
/**
* The initialization expression for this variable. May be null. Only a
* defining node has such an expression.
*/
ExpressionNodeIF initializer();
/** Returns the storage class of this variable. */
StorageClass storageClass();
/** Set the const type qualifier */
void setConst(boolean mIsConst);
/** Set the volatile type qualifier */
void setVolatile(boolean mIsVolatile);
/** Set the restrict type qualifier */
void setRestrict(boolean mIsRestrict);
void setIdentifier(IdentifierNodeIF mIdentifier);
void setType(TypeNodeIF mType);
/** Set the initializer. */
void setInitializer(ExpressionNodeIF initializer);
/** Set the storage class. */
void setStorageClass(StorageClass storageClass);
}