mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
GH-122155: Track local variables between pops and pushes in cases generator (GH-122286)
This commit is contained in:
parent
46f5a4f9e1
commit
a9d56e38a0
13 changed files with 463 additions and 159 deletions
|
@ -60,6 +60,11 @@ class Node:
|
|||
end = context.end
|
||||
return tokens[begin:end]
|
||||
|
||||
@property
|
||||
def first_token(self) -> lx.Token:
|
||||
context = self.context
|
||||
assert context is not None
|
||||
return context.owner.tokens[context.begin]
|
||||
|
||||
@dataclass
|
||||
class Block(Node):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue