public class NClassDef extends NNode
| Modifier and Type | Field and Description |
|---|---|
java.util.List<NNode> |
bases |
NBody |
body |
NName |
name |
| Constructor and Description |
|---|
NClassDef(NName name,
java.util.List<NNode> bases,
NBlock body) |
NClassDef(NName name,
java.util.List<NNode> bases,
NBlock body,
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. |
boolean |
isClassDef() |
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, isFunctionDef, isLambda, isModule, isName, length, resolveExpr, resolveList, resolveListAsUnion, setEnd, setParent, setStart, setType, start, visitNode, visitNodeListpublic boolean isClassDef()
isClassDef in class NNodepublic 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