class PythonAstVisitor extends PythonAstVisitorHelpers

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PythonAstVisitor
  2. PythonAstVisitorHelpers
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new PythonAstVisitor(absFileName: String, relFileName: String, nodeToCode: NodeToCode, version: PythonVersion)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addAstChildNodes(parentNode: NewNode, startIndex: Int, childNodes: NewNode*): Unit
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  5. def addAstChildNodes(parentNode: NewNode, startIndex: AutoIncIndex, childNodes: NewNode*): Unit
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  6. def addAstChildNodes(parentNode: NewNode, startIndex: Int, childNodes: Iterable[NewNode]): Unit
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  7. def addAstChildNodes(parentNode: NewNode, startIndex: AutoIncIndex, childNodes: Iterable[NewNode]): Unit
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  8. def addAstChildrenAsArguments(parentNode: NewNode, startIndex: Int, childNodes: NewNode*): Unit
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  9. def addAstChildrenAsArguments(parentNode: NewNode, startIndex: AutoIncIndex, childNodes: NewNode*): Unit
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  10. def addAstChildrenAsArguments(parentNode: NewNode, startIndex: Int, childNodes: Iterable[NewNode]): Unit
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  11. def addAstChildrenAsArguments(parentNode: NewNode, startIndex: AutoIncIndex, childNodes: Iterable[NewNode]): Unit
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  12. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  13. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  14. def codeOf(node: NewNode): String
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  15. val contextStack: ContextStack
    Attributes
    protected
  16. def convert(typeIgnore: TypeIgnore): NewNode
  17. def convert(alias: Alias): NewNode
  18. def convert(keyword: Keyword): NewNode
  19. def convert(parameters: Arguments, startIndex: Int): Iterable[NewMethodParameterIn]
  20. def convert(exceptHandler: ExceptHandler): NewNode
  21. def convert(stringExpList: StringExpList): NewNode
  22. def convert(slice: Slice): NewNode
  23. def convert(tuple: Tuple): NewNode
  24. def convert(list: List): NewNode
  25. def convert(name: Name): NewNode
  26. def convert(starred: Starred): NewNode
  27. def convert(subscript: Subscript): NewNode
  28. def convert(attribute: Attribute): NewNode

    TODO We currently ignore possible attribute access provider/interception mechanisms like getattr, getattribute and get.

  29. def convert(constant: Constant): NewNode
  30. def convert(joinedString: JoinedString): NewNode
  31. def convert(formattedValue: FormattedValue): NewNode
  32. 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.

    1. 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"
  33. def convert(compare: Compare): NewNode
  34. def convert(yieldFrom: YieldFrom): NewNode
  35. def convert(yieldExpr: Yield): NewNode
  36. def convert(await: Await): NewNode
  37. 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.

  38. 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 }

  39. 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 }

  40. 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 }

  41. def convert(set: Set): NewNode
  42. def convert(dict: Dict): NewNode

    Lowering of {x:1, y:2, **z}: { tmp = {} tmp[x] = 1 tmp[y] = 2 tmp.update(z) tmp }

  43. def convert(ifExp: IfExp): NewNode
  44. def convert(lambda: Lambda): NewNode
  45. def convert(unaryOp: UnaryOp): NewNode
  46. def convert(binOp: BinOp): NewNode
  47. def convert(namedExpr: NamedExpr): NewNode
  48. def convert(boolOp: BoolOp): NewNode
  49. def convert(expr: iexpr): NewNode
  50. def convert(errorStatement: ErrorStatement): NewNode
  51. def convert(raise: RaiseP2): NewNode
  52. def convert(astContinue: Continue): NewNode
  53. def convert(astBreak: Break): NewNode
  54. def convert(pass: Pass): NewNode
  55. def convert(expr: Expr): NewNode
  56. def convert(nonLocal: Nonlocal): NewNode
  57. def convert(global: Global): NewNode
  58. def convert(importFrom: ImportFrom): NewNode
  59. def convert(importStmt: Import): NewNode
  60. def convert(assert: Assert): NewNode
  61. def convert(tryStmt: Try): NewNode
  62. def convert(raise: Raise): NewNode
  63. def convert(withStmt: AsyncWith): NewNode
  64. def convert(withStmt: With): NewNode
  65. def convert(astIf: If): NewNode
  66. def convert(astWhile: While): NewNode
  67. def convert(forStmt: AsyncFor): NewNode
  68. def convert(forStmt: For): NewNode
  69. def convert(augAssign: AugAssign): NewNode
  70. def convert(annotatedAssign: AnnAssign): NewNode
  71. def convert(assign: Assign): NewNode
  72. def convert(delete: Delete): NewNode
  73. def convert(ret: Return): NewNode
  74. def convert(classDef: ClassDef): NewNode
  75. def convert(functionDef: AsyncFunctionDef): NewNode
  76. def convert(functionDef: FunctionDef): NewNode
  77. def convert(stmt: istmt): NewNode
  78. def convert(module: Module): NewNode
  79. def convert(mod: imod): NewNode
  80. def convert(astNode: iast): NewNode
  81. def convertKeywordOnlyArg(arg: Arg): NewMethodParameterIn
  82. def convertKwArg(arg: Arg): NewMethodParameterIn
  83. def convertNormalArg(arg: Arg, index: AutoIncIndex): NewMethodParameterIn
  84. def convertPosOnlyArg(arg: Arg, index: AutoIncIndex): NewMethodParameterIn
  85. def convertVarArg(arg: Arg, index: AutoIncIndex): NewMethodParameterIn
  86. def createArguments(arguments: Arguments, lineAndColumn: LineAndColumn): (Iterable[NewNode], Iterable[(String, NewNode)])
  87. def createAssignment(lhsNode: NewNode, rhsNode: NewNode, lineAndColumn: LineAndColumn): NewNode
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  88. def createAssignmentToIdentifier(identifierName: String, rhsNode: NewNode, lineAndColumn: LineAndColumn): NewNode
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  89. def createAugAssignment(lhsNode: NewNode, operatorCode: String, rhsNode: NewNode, operatorFullName: String, lineAndColumn: LineAndColumn): NewNode
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  90. def createBinaryOperatorCall(lhsNode: NewNode, opCodeAndFullName: () => (String, String), rhsNode: NewNode, lineAndColumn: LineAndColumn): NewCall
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  91. def createBinding(methodNode: NewMethod, typeDeclNode: NewTypeDecl): NewBinding
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  92. def createBlock(blockElements: Iterable[NewNode], lineAndColumn: LineAndColumn): NewNode
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  93. def createCall(receiverNode: NewNode, name: String, lineAndColumn: LineAndColumn, argumentNodes: Iterable[NewNode], keywordArguments: Iterable[(String, NewNode)]): NewCall
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  94. def createComprehensionLowering(tmpVariableName: String, containerInitAssignNode: NewNode, innerMostLoopNode: NewNode, comprehensions: Iterable[Comprehension], lineAndColumn: LineAndColumn): NewNode
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  95. def createFieldAccess(baseNode: NewNode, fieldName: String, lineAndColumn: LineAndColumn): NewCall
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  96. def createForLowering(target: iexpr, iter: iexpr, ifs: Iterable[iexpr], bodyNodes: Iterable[NewNode], orelseNodes: Iterable[NewNode], isAsync: Boolean, lineAndColumn: LineAndColumn): NewNode
    Attributes
    protected
  97. def createIdentifierNode(name: String, memOp: MemoryOperation, lineAndColumn: LineAndColumn): NewIdentifier
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  98. def createIndexAccess(baseNode: NewNode, indexNode: NewNode, lineAndColumn: LineAndColumn): NewNode
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  99. def createIndexAccessChain(rootNode: NewNode, accessChain: List[Int], lineAndColumn: LineAndColumn): NewNode
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  100. def createInstanceCall(receiverNode: NewNode, instanceNode: NewNode, name: String, lineAndColumn: LineAndColumn, argumentNodes: Iterable[NewNode], keywordArguments: Iterable[(String, NewNode)]): NewCall
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  101. def createLiteralOperatorCall(codeStart: String, codeEnd: String, opFullName: String, lineAndColumn: LineAndColumn, operands: NewNode*): NewCall
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  102. def createNAryOperatorCall(opCodeAndFullName: () => (String, String), operands: Iterable[NewNode], lineAndColumn: LineAndColumn): NewNode
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  103. def createReturn(returnExprOption: Option[NewNode], codeOption: Option[String], lineAndColumn: LineAndColumn): NewReturn
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  104. def createStarredUnpackOperatorCall(unpackOperand: NewNode, lineAndColumn: LineAndColumn): NewNode
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  105. def createStaticCall(name: String, methodFullName: String, lineAndColumn: LineAndColumn, argumentNodes: Iterable[NewNode], keywordArguments: Iterable[(String, NewNode)]): NewNode
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  106. def createTransformedImport(from: String, names: Iterable[Alias], lineAndCol: LineAndColumn): NewNode
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  107. def createTry(body: Iterable[NewNode], handlers: Iterable[NewNode], finalBlock: Iterable[NewNode], orElseBlock: Iterable[NewNode], lineAndColumn: LineAndColumn): NewNode
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  108. def createTypeRef(typeName: String, typeFullName: String, lineAndColumn: LineAndColumn): NewTypeRef
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  109. def createValueToTargetsDecomposition(targets: Iterable[iexpr], valueNode: NewNode, lineAndColumn: LineAndColumn): Iterable[NewNode]
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  110. def createXDotYCall(x: () => NewNode, y: String, xMayHaveSideEffects: Boolean, lineAndColumn: LineAndColumn, argumentNodes: Iterable[NewNode], keywordArguments: Iterable[(String, NewNode)]): NewNode
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  111. val edgeBuilder: EdgeBuilder
    Attributes
    protected
  112. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  113. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  114. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  115. def getDiffGraph: DiffGraphBuilder
  116. def getTargetsWithAccessChains(target: iexpr): Iterable[(iexpr, List[Int])]
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  117. def getUnusedName(prefix: String = null): String
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  118. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  119. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  120. def lineAndColOf(node: iattributes): LineAndColumn
    Attributes
    protected
    Definition Classes
    PythonAstVisitorHelpers
  121. def lowerComparatorChain(lhsNode: NewNode, compOperators: Iterable[icompop], comparators: Iterable[iexpr], lineAndColumn: LineAndColumn): Iterable[NewNode]
  122. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  123. val nodeBuilder: NodeBuilder
    Attributes
    protected
  124. val nodeToCode: NodeToCode
    Attributes
    protected
  125. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  126. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  127. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  128. def toString(): String
    Definition Classes
    AnyRef → Any
  129. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  130. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  131. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  132. def wrapMethodRefWithDecorators(methodRefNode: NewNode, decoratorList: Iterable[iexpr]): NewNode

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped