public final class VariableStatement extends VariableDeclarationBase implements Statement
Modifier and Type | Field and Description |
---|---|
ValueExpression |
exp |
type
annotation, name
Modifier and Type | Method and Description |
---|---|
void |
accept(ASTVisitor visitor)
Accept visitor for a visit.
|
void |
accept(ASTVisitorOld visitor)
Accept visitor for a visit.
|
void |
acceptChildren(ASTVisitor visitor)
Accept visitor for a visit to the children of this node.
|
static VariableStatement |
construct(TypeExpression type,
Identifier var,
ValueExpression exp)
Construct a local variable declaration
|
StatJudgement |
getJudgement()
Get command judgement.
|
java.lang.String |
getKind()
Get type of statement.
|
void |
setJudgement(StatJudgement judgement)
Set command judgement.
|
getType
getAnnotation, getName, setAnnotation
getPosition, setPosition
accept, accept, print, printCore, toString, toStringCore
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getPosition, setPosition
getAnnotation, setAnnotation
print, printCore, toString, toStringCore
getName
public final ValueExpression exp
public static VariableStatement construct(TypeExpression type, Identifier var, ValueExpression exp)
type
- the type of the variablevar
- the name of the variableexp
- the initialization expression (may be null)public void setJudgement(StatJudgement judgement)
setJudgement
in interface Statement
judgement
- the judgement.public StatJudgement getJudgement()
getJudgement
in interface Statement
public void accept(ASTVisitorOld visitor)
accept
in interface AST
accept
in class VariableDeclarationBase
visitor
- the visitor who is accepted by this node.public void accept(ASTVisitor visitor)
accept
in interface AST
accept
in class VariableDeclarationBase
visitor
- the visitor who is accepted by this node.public void acceptChildren(ASTVisitor visitor)
acceptChildren
in interface AST
acceptChildren
in class VariableDeclarationBase
visitor
- the visitor who is accepted by the children of this node.