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

Method keyword_helper

Tools/peg_generator/pegen/c_generator.py:138–146  ·  view source on GitHub ↗
(self, keyword: str)

Source from the content-addressed store, hash-verified

136 self.cleanup_statements: list[str] = []
137
138 def keyword_helper(self, keyword: str) -> FunctionCall:
139 return FunctionCall(
140 assigned_variable="_keyword",
141 function="_PyPegen_expect_token",
142 arguments=["p", self.gen.keywords[keyword]],
143 return_type="Token *",
144 nodetype=NodeTypes.KEYWORD,
145 comment=f"token='{keyword}'",
146 )
147
148 def soft_keyword_helper(self, value: str) -> FunctionCall:
149 return FunctionCall(

Callers 1

visit_StringLeafMethod · 0.95

Calls 1

FunctionCallClass · 0.85

Tested by

no test coverage detected