public class NFor extends NNode
| Modifier and Type | Field and Description |
|---|---|
NBlock |
body |
NNode |
iter |
NBlock |
orelse |
NNode |
target |
| Constructor and Description |
|---|
NFor(NNode target,
NNode iter,
NBlock body,
NBlock orelse) |
NFor(NNode target,
NNode iter,
NBlock body,
NBlock orelse,
int start,
int end) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
bindNames(Scope s)
Called by resolver to bind names into the passed scope.
|
boolean |
bindsName()
Returns
true if this is a name-binding node. |
NType |
resolve(Scope s)
Node should set the resolved type in its
NNode.type field
and also return it. |
java.lang.String |
toString() |
void |
visit(NNodeVisitor v)
Visits this node and optionally its children.
|
addChildren, addChildren, addError, addError, addType, addWarning, addWarning, end, getAstRoot, getDeepestNodeAtOffset, getEnclosingNamespace, getFile, getParent, getTable, getType, isCall, isClassDef, isFunctionDef, isLambda, isModule, isName, length, resolveExpr, resolveList, resolveListAsUnion, setEnd, setParent, setStart, setType, start, visitNode, visitNodeListpublic NNode target
public NNode iter
public NBlock body
public NBlock orelse
public boolean bindsName()
NNodetrue if this is a name-binding node. Includes functions/lambdas,
function/lambda params, classes, assignments, imports, and implicit assignment via for
statements and except clauses.protected void bindNames(Scope s) throws java.lang.Exception
NNodepublic NType resolve(Scope s) throws java.lang.Exception
NNodeNNode.type field
and also return it.public java.lang.String toString()
toString in class java.lang.Objectpublic void visit(NNodeVisitor v)
NNode