@@ -90,8 +90,10 @@ class AugAssign extends AugAssign_ {
90
90
/* syntax: Expr += Expr */
91
91
override Expr getASubExpression ( ) { result = this .getOperation ( ) }
92
92
93
+ /** Gets the target of this augmented assignment statement. */
93
94
Expr getTarget ( ) { result = this .getOperation ( ) .( BinaryExpr ) .getLeft ( ) }
94
95
96
+ /** Gets the value of this augmented assignment statement. */
95
97
Expr getValue ( ) { result = this .getOperation ( ) .( BinaryExpr ) .getRight ( ) }
96
98
97
99
override Stmt getASubStatement ( ) { none ( ) }
@@ -405,22 +407,25 @@ class TemplateWrite extends TemplateWrite_ {
405
407
override Stmt getASubStatement ( ) { none ( ) }
406
408
}
407
409
410
+ /** An asynchronous `for` statement, such as `async for varname in Expr: ...` */
408
411
class AsyncFor extends For {
409
412
/* syntax: async for varname in Expr: ... */
410
413
AsyncFor ( ) { this .isAsync ( ) }
411
414
}
412
415
416
+ /** An asynchronous `with` statement, such as `async with varname as Expr: ...` */
413
417
class AsyncWith extends With {
414
418
/* syntax: async with Expr as varname: ... */
415
419
AsyncWith ( ) { this .isAsync ( ) }
416
420
}
417
421
418
422
/** A list of statements */
419
423
class StmtList extends StmtList_ {
420
- /** Whether this list of statements contains s */
424
+ /** Holds if this list of statements contains the AST node `a` */
421
425
predicate contains ( AstNode a ) {
422
426
exists ( Stmt item | item = this .getAnItem ( ) | item = a or item .contains ( a ) )
423
427
}
424
428
429
+ /** Gets the last item in this list of statements. */
425
430
Stmt getLastItem ( ) { result = this .getItem ( max ( int i | exists ( this .getItem ( i ) ) ) ) }
426
431
}
0 commit comments