public class NLambda extends NFunctionDef
Constructor and Description |
---|
NLambda(java.util.List<NNode> args,
NNode body,
java.util.List<NNode> defaults,
NName varargs,
NName kwargs) |
NLambda(java.util.List<NNode> args,
NNode body,
java.util.List<NNode> defaults,
NName varargs,
NName kwargs,
int start,
int end) |
Modifier and Type | Method and Description |
---|---|
protected void |
bindFunctionName(Scope owner) |
protected void |
bindMethodAttrs(Scope owner) |
protected java.lang.String |
getBindingName(Scope s)
Returns the name of the function for indexing/qname purposes.
|
boolean |
isLambda() |
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.
|
addReadOnlyAttr, addSpecialAttr, bindFunctionDefaults, bindFunctionParams, bindNames, bindsName, getDecoratorList, isFunctionDef, setDecoratorList
addChildren, addChildren, addError, addError, addType, addWarning, addWarning, end, getAstRoot, getDeepestNodeAtOffset, getEnclosingNamespace, getFile, getParent, getTable, getType, isCall, isClassDef, isModule, isName, length, resolveExpr, resolveList, resolveListAsUnion, setEnd, setParent, setStart, setType, start, visitNode, visitNodeList
public NLambda(java.util.List<NNode> args, NNode body, java.util.List<NNode> defaults, NName varargs, NName kwargs)
protected java.lang.String getBindingName(Scope s)
getBindingName
in class NFunctionDef
protected void bindFunctionName(Scope owner) throws java.lang.Exception
bindFunctionName
in class NFunctionDef
java.lang.Exception
protected void bindMethodAttrs(Scope owner) throws java.lang.Exception
bindMethodAttrs
in class NFunctionDef
java.lang.Exception
public NType resolve(Scope s) throws java.lang.Exception
NNode
NNode.type
field
and also return it.resolve
in class NFunctionDef
java.lang.Exception
public java.lang.String toString()
toString
in class NFunctionDef
public void visit(NNodeVisitor v)
NNode
visit
in class NFunctionDef
v
- the object to call with this node.
If the visitor returns true
, the node also
passes its children to the visitor.