class PythonAstVisitor extends PythonAstVisitorHelpers
- Alphabetic
- By Inheritance
- PythonAstVisitor
- PythonAstVisitorHelpers
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new PythonAstVisitor(absFileName: String, relFileName: String, nodeToCode: NodeToCode, version: PythonVersion)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addAstChildNodes(parentNode: NewNode, startIndex: Int, childNodes: NewNode*): Unit
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def addAstChildNodes(parentNode: NewNode, startIndex: AutoIncIndex, childNodes: NewNode*): Unit
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def addAstChildNodes(parentNode: NewNode, startIndex: Int, childNodes: Iterable[NewNode]): Unit
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def addAstChildNodes(parentNode: NewNode, startIndex: AutoIncIndex, childNodes: Iterable[NewNode]): Unit
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def addAstChildrenAsArguments(parentNode: NewNode, startIndex: Int, childNodes: NewNode*): Unit
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def addAstChildrenAsArguments(parentNode: NewNode, startIndex: AutoIncIndex, childNodes: NewNode*): Unit
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def addAstChildrenAsArguments(parentNode: NewNode, startIndex: Int, childNodes: Iterable[NewNode]): Unit
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def addAstChildrenAsArguments(parentNode: NewNode, startIndex: AutoIncIndex, childNodes: Iterable[NewNode]): Unit
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def codeOf(node: NewNode): String
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- val contextStack: ContextStack
- Attributes
- protected
- def convert(typeIgnore: TypeIgnore): NewNode
- def convert(alias: Alias): NewNode
- def convert(keyword: Keyword): NewNode
- def convert(parameters: Arguments, startIndex: Int): Iterable[NewMethodParameterIn]
- def convert(exceptHandler: ExceptHandler): NewNode
- def convert(stringExpList: StringExpList): NewNode
- def convert(slice: Slice): NewNode
- def convert(tuple: Tuple): NewNode
- def convert(list: List): NewNode
- def convert(name: Name): NewNode
- def convert(starred: Starred): NewNode
- def convert(subscript: Subscript): NewNode
- def convert(attribute: Attribute): NewNode
TODO We currently ignore possible attribute access provider/interception mechanisms like getattr, getattribute and get.
- def convert(constant: Constant): NewNode
- def convert(joinedString: JoinedString): NewNode
- def convert(formattedValue: FormattedValue): NewNode
- def convert(call: Call): NewNode
TODO For now this function compromises on the correctness of the lowering in order to get some data flow tracking going.
TODO For now this function compromises on the correctness of the lowering in order to get some data flow tracking going.
- For constructs like x.func() we assume x to be the instance which is passed into func. This is not true since the instance method object gets the instance already bound/captured during function access. This becomes relevant for constructs like: x.func = y.func <- y.func is class method object x.func() In this case the instance passed into func is y and not x. We cannot represent this in th CPG and thus stick to the assumption that the part before the "." and the bound/captured instance will be the same. For reference see: https://docs.python.org/3/reference/datamodel.html#the-standard-type-hierarchy search for "Instance methods"
- def convert(compare: Compare): NewNode
- def convert(yieldFrom: YieldFrom): NewNode
- def convert(yieldExpr: Yield): NewNode
- def convert(await: Await): NewNode
- def convert(generatorExp: GeneratorExp): NewNode
Lowering of (x for y in l for x in y): { tmp = <operator>.genExp <loweringOf>( for y in l: for x in y: tmp.append(x) ) tmp } This lowering is not quite correct as it ignores the lazy evaluation of the generator expression.
Lowering of (x for y in l for x in y): { tmp = <operator>.genExp <loweringOf>( for y in l: for x in y: tmp.append(x) ) tmp } This lowering is not quite correct as it ignores the lazy evaluation of the generator expression. Instead it just mimics the list comprehension lowering but for now this is good enough.
- def convert(dictComp: DictComp): NewNode
Lowering of {k:v for y in l for k, v in y}: { tmp = {} <loweringOf>( for y in l: for k, v in y: tmp[k] = v ) tmp }
- def convert(setComp: SetComp): NewNode
Lowering of {x for y in l for x in y}: { tmp = {} <loweringOf>( for y in l: for x in y: tmp.add(x) ) tmp }
- def convert(listComp: ListComp): NewNode
Lowering of [x for y in l for x in y]: { tmp = [] <loweringOf>( for y in l: for x in y: tmp.append(x) ) tmp }
- def convert(set: Set): NewNode
- def convert(dict: Dict): NewNode
Lowering of {x:1, y:2, **z}: { tmp = {} tmp[x] = 1 tmp[y] = 2 tmp.update(z) tmp }
- def convert(ifExp: IfExp): NewNode
- def convert(lambda: Lambda): NewNode
- def convert(unaryOp: UnaryOp): NewNode
- def convert(binOp: BinOp): NewNode
- def convert(namedExpr: NamedExpr): NewNode
- def convert(boolOp: BoolOp): NewNode
- def convert(expr: iexpr): NewNode
- def convert(errorStatement: ErrorStatement): NewNode
- def convert(raise: RaiseP2): NewNode
- def convert(astContinue: Continue): NewNode
- def convert(astBreak: Break): NewNode
- def convert(pass: Pass): NewNode
- def convert(expr: Expr): NewNode
- def convert(nonLocal: Nonlocal): NewNode
- def convert(global: Global): NewNode
- def convert(importFrom: ImportFrom): NewNode
- def convert(importStmt: Import): NewNode
- def convert(assert: Assert): NewNode
- def convert(tryStmt: Try): NewNode
- def convert(raise: Raise): NewNode
- def convert(withStmt: AsyncWith): NewNode
- def convert(withStmt: With): NewNode
- def convert(astIf: If): NewNode
- def convert(astWhile: While): NewNode
- def convert(forStmt: AsyncFor): NewNode
- def convert(forStmt: For): NewNode
- def convert(augAssign: AugAssign): NewNode
- def convert(annotatedAssign: AnnAssign): NewNode
- def convert(assign: Assign): NewNode
- def convert(delete: Delete): NewNode
- def convert(ret: Return): NewNode
- def convert(classDef: ClassDef): NewNode
- def convert(functionDef: AsyncFunctionDef): NewNode
- def convert(functionDef: FunctionDef): NewNode
- def convert(stmt: istmt): NewNode
- def convert(module: Module): NewNode
- def convert(mod: imod): NewNode
- def convert(astNode: iast): NewNode
- def convertKeywordOnlyArg(arg: Arg): NewMethodParameterIn
- def convertKwArg(arg: Arg): NewMethodParameterIn
- def convertNormalArg(arg: Arg, index: AutoIncIndex): NewMethodParameterIn
- def convertPosOnlyArg(arg: Arg, index: AutoIncIndex): NewMethodParameterIn
- def convertVarArg(arg: Arg, index: AutoIncIndex): NewMethodParameterIn
- def createArguments(arguments: Arguments, lineAndColumn: LineAndColumn): (Iterable[NewNode], Iterable[(String, NewNode)])
- def createAssignment(lhsNode: NewNode, rhsNode: NewNode, lineAndColumn: LineAndColumn): NewNode
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def createAssignmentToIdentifier(identifierName: String, rhsNode: NewNode, lineAndColumn: LineAndColumn): NewNode
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def createAugAssignment(lhsNode: NewNode, operatorCode: String, rhsNode: NewNode, operatorFullName: String, lineAndColumn: LineAndColumn): NewNode
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def createBinaryOperatorCall(lhsNode: NewNode, opCodeAndFullName: () => (String, String), rhsNode: NewNode, lineAndColumn: LineAndColumn): NewCall
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def createBinding(methodNode: NewMethod, typeDeclNode: NewTypeDecl): NewBinding
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def createBlock(blockElements: Iterable[NewNode], lineAndColumn: LineAndColumn): NewNode
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def createCall(receiverNode: NewNode, name: String, lineAndColumn: LineAndColumn, argumentNodes: Iterable[NewNode], keywordArguments: Iterable[(String, NewNode)]): NewCall
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def createComprehensionLowering(tmpVariableName: String, containerInitAssignNode: NewNode, innerMostLoopNode: NewNode, comprehensions: Iterable[Comprehension], lineAndColumn: LineAndColumn): NewNode
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def createFieldAccess(baseNode: NewNode, fieldName: String, lineAndColumn: LineAndColumn): NewCall
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def createForLowering(target: iexpr, iter: iexpr, ifs: Iterable[iexpr], bodyNodes: Iterable[NewNode], orelseNodes: Iterable[NewNode], isAsync: Boolean, lineAndColumn: LineAndColumn): NewNode
- Attributes
- protected
- def createIdentifierNode(name: String, memOp: MemoryOperation, lineAndColumn: LineAndColumn): NewIdentifier
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def createIndexAccess(baseNode: NewNode, indexNode: NewNode, lineAndColumn: LineAndColumn): NewNode
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def createIndexAccessChain(rootNode: NewNode, accessChain: List[Int], lineAndColumn: LineAndColumn): NewNode
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def createInstanceCall(receiverNode: NewNode, instanceNode: NewNode, name: String, lineAndColumn: LineAndColumn, argumentNodes: Iterable[NewNode], keywordArguments: Iterable[(String, NewNode)]): NewCall
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def createLiteralOperatorCall(codeStart: String, codeEnd: String, opFullName: String, lineAndColumn: LineAndColumn, operands: NewNode*): NewCall
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def createNAryOperatorCall(opCodeAndFullName: () => (String, String), operands: Iterable[NewNode], lineAndColumn: LineAndColumn): NewNode
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def createReturn(returnExprOption: Option[NewNode], codeOption: Option[String], lineAndColumn: LineAndColumn): NewReturn
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def createStarredUnpackOperatorCall(unpackOperand: NewNode, lineAndColumn: LineAndColumn): NewNode
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def createStaticCall(name: String, methodFullName: String, lineAndColumn: LineAndColumn, argumentNodes: Iterable[NewNode], keywordArguments: Iterable[(String, NewNode)]): NewNode
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def createTransformedImport(from: String, names: Iterable[Alias], lineAndCol: LineAndColumn): NewNode
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def createTry(body: Iterable[NewNode], handlers: Iterable[NewNode], finalBlock: Iterable[NewNode], orElseBlock: Iterable[NewNode], lineAndColumn: LineAndColumn): NewNode
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def createTypeRef(typeName: String, typeFullName: String, lineAndColumn: LineAndColumn): NewTypeRef
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def createValueToTargetsDecomposition(targets: Iterable[iexpr], valueNode: NewNode, lineAndColumn: LineAndColumn): Iterable[NewNode]
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def createXDotYCall(x: () => NewNode, y: String, xMayHaveSideEffects: Boolean, lineAndColumn: LineAndColumn, argumentNodes: Iterable[NewNode], keywordArguments: Iterable[(String, NewNode)]): NewNode
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- val edgeBuilder: EdgeBuilder
- Attributes
- protected
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getDiffGraph: DiffGraphBuilder
- def getTargetsWithAccessChains(target: iexpr): Iterable[(iexpr, List[Int])]
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def getUnusedName(prefix: String = null): String
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def lineAndColOf(node: iattributes): LineAndColumn
- Attributes
- protected
- Definition Classes
- PythonAstVisitorHelpers
- def lowerComparatorChain(lhsNode: NewNode, compOperators: Iterable[icompop], comparators: Iterable[iexpr], lineAndColumn: LineAndColumn): Iterable[NewNode]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val nodeBuilder: NodeBuilder
- Attributes
- protected
- val nodeToCode: NodeToCode
- Attributes
- protected
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def wrapMethodRefWithDecorators(methodRefNode: NewNode, decoratorList: Iterable[iexpr]): NewNode
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated