(self)
| 508 | |
| 509 | @contextual |
| 510 | def macro_def(self) -> Macro | None: |
| 511 | if tkn := self.expect(lx.MACRO): |
| 512 | if self.expect(lx.LPAREN): |
| 513 | if tkn := self.expect(lx.IDENTIFIER): |
| 514 | if self.expect(lx.RPAREN): |
| 515 | if self.expect(lx.EQUALS): |
| 516 | if uops := self.uops(): |
| 517 | self.require(lx.SEMI) |
| 518 | res = Macro(tkn.text, uops) |
| 519 | return res |
| 520 | return None |
| 521 | |
| 522 | def uops(self) -> list[UOp] | None: |
| 523 | if uop := self.uop(): |
no test coverage detected