public class JsFor extends JsStatement
for
statement. If specified at all, the initializer part is either a declaration
of one or more variables, in which case getInitVars()
is used, or an expression, in
which case getInitExpr()
is used. In the latter case, the comma operator is often used
to create a compound expression.
Note that any of the parts of the for
loop header can be null
, although
the body will never be null.
Constructor and Description |
---|
JsFor(SourceInfo sourceInfo) |
Modifier and Type | Method and Description |
---|---|
JsStatement |
getBody() |
JsExpression |
getCondition() |
JsExpression |
getIncrExpr() |
JsExpression |
getInitExpr() |
JsVars |
getInitVars() |
NodeKind |
getKind() |
void |
setBody(JsStatement body) |
void |
setCondition(JsExpression condition) |
void |
setIncrExpr(JsExpression incrExpr) |
void |
setInitExpr(JsExpression initExpr) |
void |
setInitVars(JsVars initVars) |
void |
traverse(JsVisitor v,
JsContext ctx)
Causes this object to have the visitor visit itself and its children.
|
unconditionalControlBreak
getSourceInfo, setSourceInfo, toSource, toSource, toString
public JsFor(SourceInfo sourceInfo)
public JsStatement getBody()
public JsExpression getCondition()
public JsExpression getIncrExpr()
public JsExpression getInitExpr()
public JsVars getInitVars()
public void setBody(JsStatement body)
public void setCondition(JsExpression condition)
public void setIncrExpr(JsExpression incrExpr)
public void setInitExpr(JsExpression initExpr)
public void setInitVars(JsVars initVars)
public void traverse(JsVisitor v, JsContext ctx)
JsVisitable
v
- the visitor that should traverse this nodectx
- the context of an existing traversalCopyright © 2018. All rights reserved.