Method
maybe
(self, kind: str, raw: bool = False)
Source from the content-addressed store, hash-verified
| 45 | return tok |
| 46 | |
| 47 | def maybe(self, kind: str, raw: bool = False) -> Token | None: |
| 48 | # Return next token without advancing position if kind matches |
| 49 | tok = self.peek(raw=raw) |
| 50 | if tok and tok.kind == kind: |
| 51 | return tok |
| 52 | return None |
| 53 | |
| 54 | def expect(self, kind: str) -> Token | None: |
| 55 | # Return next token and advance position if kind matches |
Callers
nothing calls this directly
Tested by
no test coverage detected