Skip to content

Commit 9da8c23

Browse files
committed
change the order of the children from FunctionDef
1 parent 9604705 commit 9da8c23

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

python/ql/src/semmle/python/PrintAst.qll

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,19 @@ class FunctionNode extends AstElementNode {
330330
}
331331
}
332332

333+
/**
334+
* A print node for a `FunctionDef`.
335+
*/
336+
class FunctionDefNode extends AstElementNode {
337+
override FunctionDef element;
338+
339+
override AstNode getChildNode(int childIndex) {
340+
childIndex = 0 and result = element.getTarget(0)
341+
or
342+
childIndex = 1 and result = element.getValue()
343+
}
344+
}
345+
333346
/**
334347
* A print node for the parameters in `func`.
335348
*/

0 commit comments

Comments
 (0)