MCPcopy Index your code
hub / github.com/python/cpython / block

Method block

Tools/cases_generator/parsing.py:642–647  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

640 return None
641
642 def block(self) -> BlockStmt:
643 open = self.require(lx.LBRACE)
644 stmts: list[Stmt] = []
645 while not (close := self.expect(lx.RBRACE)):
646 stmts.append(self.stmt())
647 return BlockStmt(open, stmts, close)
648
649 def stmt(self) -> Stmt:
650 if tkn := self.expect(lx.IF):

Callers 6

label_defMethod · 0.95
inst_defMethod · 0.95
stmtMethod · 0.95
if_stmtMethod · 0.95
for_stmtMethod · 0.95
while_stmtMethod · 0.95

Calls 5

expectMethod · 0.95
stmtMethod · 0.95
BlockStmtClass · 0.85
requireMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected