org.python.indexer.ast
Class NGeneratorExp
- java.lang.Object
-
- org.python.indexer.ast.NNode
-
- org.python.indexer.ast.NGeneratorExp
-
- All Implemented Interfaces:
- java.io.Serializable
public class NGeneratorExp extends NNode
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description NNodeeltjava.util.List<NComprehension>generators
-
Constructor Summary
Constructors Constructor and Description NGeneratorExp(NNode elt, java.util.List<NComprehension> generators)NGeneratorExp(NNode elt, java.util.List<NComprehension> generators, int start, int end)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description NTyperesolve(Scope s)Python's list comprehension will erase any variable used in generators.java.lang.StringtoString()voidvisit(NNodeVisitor v)Visits this node and optionally its children.-
Methods inherited from class org.python.indexer.ast.NNode
addChildren, addChildren, addType, bindsName, end, getAstRoot, getDeepestNodeAtOffset, getEnclosingNamespace, getFile, getParent, getTable, getType, isCall, isClassDef, isFunctionDef, isLambda, isModule, isName, length, resolveExpr, setEnd, setParent, setStart, setType, start
-
-
-
-
Field Detail
-
elt
public NNode elt
-
generators
public java.util.List<NComprehension> generators
-
-
Constructor Detail
-
NGeneratorExp
public NGeneratorExp(NNode elt, java.util.List<NComprehension> generators)
-
NGeneratorExp
public NGeneratorExp(NNode elt, java.util.List<NComprehension> generators, int start, int end)
-
-
Method Detail
-
resolve
public NType resolve(Scope s) throws java.lang.Exception
Python's list comprehension will erase any variable used in generators. This is wrong, but we "respect" this bug here.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
visit
public void visit(NNodeVisitor v)
Description copied from class:NNodeVisits this node and optionally its children.
-
-
DMelt 3.0 © DataMelt by jWork.ORG