Python: Small refactor

This commit is contained in:
Rasmus Lerchedahl Petersen
2021-01-21 10:44:58 +01:00
parent 19918e2e57
commit bc1b50788a

View File

@@ -357,15 +357,13 @@ class KwUnpackedNode extends Node, TKwUnpackedNode {
* step to TIterableElement followed by a store step to the target.
*/
class IterableSequenceNode extends Node, TIterableSequenceNode {
SequenceNode consumer;
CfgNode consumer;
IterableSequenceNode() { this = TIterableSequenceNode(consumer) }
IterableSequenceNode() { this = TIterableSequenceNode(consumer.getNode()) }
override string toString() { result = "IterableSequence" }
override DataFlowCallable getEnclosingCallable() {
result = any(CfgNode node | node = TCfgNode(consumer)).getEnclosingCallable()
}
override DataFlowCallable getEnclosingCallable() { result = consumer.getEnclosingCallable() }
override Location getLocation() { result = consumer.getLocation() }
}