Top Fields Constructors Methods
org.python.indexer.ast

public Class NListComp

extends NNode
Class Inheritance
Imports
org.python.indexer.Scope, org.python.indexer.types.NListType, .NType, java.util.List

Field Summary

Modifier and TypeField and Description
public NNode
public List<NComprehension>
pack-priv static final long
Inherited from org.python.indexer.ast.NNode:
parent

Constructor Summary

AccessConstructor and Description
public
NListComp(NNode elt, List<NComprehension> generators)

public
NListComp(NNode elt, List<NComprehension> generators, int start, int end)

Method Summary

Modifier and TypeMethod and Description
public NType
resolve(Scope s)

Overrides org.python.indexer.ast.NNode.resolve.

Python's list comprehension will bind the variables used in generators.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public void
visit(NNodeVisitor
the object to call with this node. If the visitor returns true, the node also passes its children to the visitor.
v
)

Implements abstract org.python.indexer.ast.NNode.visit.

Visits this node and optionally its children.

Inherited from org.python.indexer.ast.NNode:
addChildrenaddChildrenaddErroraddErroraddTypeaddWarningaddWarningbindNamesbindsNameendgetAstRootgetDeepestNodeAtOffsetgetEnclosingNamespacegetFilegetParentgetTablegetTypeisCallisClassDefisFunctionDefisLambdaisModuleisNamelengthresolveExprresolveListresolveListAsUnionsetEndsetParentsetStartsetTypestartvisitNodevisitNodeList

Field Detail

eltback to summary
public NNode elt
generatorsback to summary
public List<NComprehension> generators
serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides org.python.indexer.ast.NNode.serialVersionUID.

Constructor Detail

NListCompback to summary
public NListComp(NNode elt, List<NComprehension> generators)
NListCompback to summary
public NListComp(NNode elt, List<NComprehension> generators, int start, int end)

Method Detail

resolveback to summary
public NType resolve(Scope s) throws Exception

Overrides org.python.indexer.ast.NNode.resolve.

Python's list comprehension will bind the variables used in generators. This will erase the original values of the variables even after the comprehension.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
visitback to summary
public void visit(NNodeVisitor v)

Implements abstract org.python.indexer.ast.NNode.visit.

Doc from org.python.indexer.ast.NNode.visit.

Visits this node and optionally its children.

Parameters
v:NNodeVisitor

the object to call with this node. If the visitor returns true, the node also passes its children to the visitor.

Annotations
@Override