mirror of
https://github.com/github/codeql.git
synced 2026-02-23 10:23:41 +01:00
python: address review comments
The comment about `py_scopes` was simply removed
This commit is contained in:
@@ -83,7 +83,7 @@ library class StrListParent extends StrListParent_ { }
|
||||
library class ExprParent extends ExprParent_ { }
|
||||
|
||||
/** Internal implementation class */
|
||||
library class PatternListParent extends PatternListParent_ { }
|
||||
class PatternListParent extends PatternListParent_ { }
|
||||
|
||||
/** Internal implementation class */
|
||||
library class PatternParent extends PatternParent_ { }
|
||||
|
||||
@@ -7,12 +7,7 @@ import python
|
||||
/** A pattern in a match statement */
|
||||
class Pattern extends Pattern_, AstNode {
|
||||
/** Gets the scope of this pattern */
|
||||
override Scope getScope() {
|
||||
// TODO: Should it be defined as
|
||||
// py_scopes(this, result)
|
||||
// instead?
|
||||
result = this.getCase().getScope()
|
||||
}
|
||||
override Scope getScope() { result = this.getCase().getScope() }
|
||||
|
||||
/** Gets the case statement containing this pattern */
|
||||
Case getCase() { result.contains(this) }
|
||||
|
||||
@@ -1590,8 +1590,8 @@ import IterableUnpacking
|
||||
* case ('quit' as c) | ('go', ('up'|'down') as c):
|
||||
* ...body
|
||||
* ```
|
||||
* `command` is the subject of the as-pattern, while the second component of `command` is the subject
|
||||
* of the first capture pattern. As such, 'subject' refers to the pattern under evaluation.
|
||||
* `command` is the subject of first the as-pattern, while the second component of `command`
|
||||
* is the subject of the second as-pattern. As such, 'subject' refers to the pattern under evaluation.
|
||||
*
|
||||
* - as pattern: subject flows to alias as well as to the interior pattern
|
||||
* - or pattern: subject flows to each alternative
|
||||
|
||||
Reference in New Issue
Block a user