File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
python/ql/src/semmle/python Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -772,6 +772,25 @@ class DictNode extends ControlFlowNode {
772772 }
773773}
774774
775+ /**
776+ * A control flow node corresponding to an iterable literal. Currently does not include
777+ * dictionaries, use `DictNode` directly instead.
778+ */
779+ class IterableNode extends ControlFlowNode {
780+ IterableNode ( ) {
781+ this instanceof SequenceNode
782+ or
783+ this instanceof SetNode
784+ }
785+
786+ /** Gets the control flow node for an element of this iterable. */
787+ ControlFlowNode getAnElement ( ) {
788+ result = this .( SequenceNode ) .getAnElement ( )
789+ or
790+ result = this .( SetNode ) .getAnElement ( )
791+ }
792+ }
793+
775794private AstNode assigned_value ( Expr lhs ) {
776795 /* lhs = result */
777796 exists ( Assign a | a .getATarget ( ) = lhs and result = a .getValue ( ) )
You can’t perform that action at this time.
0 commit comments