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

Method flags

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

Source from the content-addressed store, hash-verified

577 return None
578
579 def flags(self) -> list[str]:
580 here = self.getpos()
581 if self.expect(lx.LPAREN):
582 if tkn := self.expect(lx.IDENTIFIER):
583 flags = [tkn.text]
584 while self.expect(lx.COMMA):
585 if tkn := self.expect(lx.IDENTIFIER):
586 flags.append(tkn.text)
587 else:
588 break
589 if not self.expect(lx.RPAREN):
590 raise self.make_syntax_error("Expected comma or right paren")
591 return flags
592 self.setpos(here)
593 return []
594
595 @contextual
596 def pseudo_def(self) -> Pseudo | None:

Callers 1

pseudo_defMethod · 0.95

Calls 5

expectMethod · 0.95
make_syntax_errorMethod · 0.95
getposMethod · 0.45
appendMethod · 0.45
setposMethod · 0.45

Tested by

no test coverage detected