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

Method visit_Opt

Tools/peg_generator/pegen/c_generator.py:296–304  ·  view source on GitHub ↗
(self, node: Opt)

Source from the content-addressed store, hash-verified

294 raise NotImplementedError(f"Forced tokens don't work with {node.node} nodes")
295
296 def visit_Opt(self, node: Opt) -> FunctionCall:
297 call = self.generate_call(node.node)
298 return FunctionCall(
299 assigned_variable="_opt_var",
300 function=call.function,
301 arguments=call.arguments,
302 force_true=True,
303 comment=f"{node}",
304 )
305
306 def _generate_artificial_rule_call(
307 self,

Callers

nothing calls this directly

Calls 2

generate_callMethod · 0.95
FunctionCallClass · 0.85

Tested by

no test coverage detected