mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
GH-111485: Separate out parsing, analysis and code-gen phases of tier 1 code generator (GH-112299)
This commit is contained in:
parent
3d712a9f4c
commit
b449415b2f
15 changed files with 1675 additions and 526 deletions
|
@ -141,10 +141,11 @@ class Pseudo(Node):
|
|||
flags: list[str] # instr flags to set on the pseudo instruction
|
||||
targets: list[str] # opcodes this can be replaced by
|
||||
|
||||
AstNode = InstDef | Macro | Pseudo | Family
|
||||
|
||||
class Parser(PLexer):
|
||||
@contextual
|
||||
def definition(self) -> InstDef | Macro | Pseudo | Family | None:
|
||||
def definition(self) -> AstNode | None:
|
||||
if macro := self.macro_def():
|
||||
return macro
|
||||
if family := self.family_def():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue